iOS 英语学习 翻译官方文档--不定时更新。

1,

About Text Handling in iOS

The iOS platform gives you many ways to display text in your apps and let users edit that text. It also lets you display formatted text and web content in your app’s views. The resources at your disposal range fromframework objects—such as text views, text fields, and web views—to text layout engines that you can use directly to draw, lay out, and otherwise manage text.

With the classes in the UIKit framework, you can manage the edit menu (including adding custom items to it), implement custom input views, and copy, cut, and paste data within and between apps.

Note: This document was previously titled Text, Web, and Editing Programming Guide for iOS.

At a Glance

Apps in iOS have a number of powerful technologies to handle text, both for editing text and for rendering high-quality typographically formatted text.

The UIKit Framework Provides Your App with Text and Web Objects

You can add ready-made text views, text fields, and labels to your app’s user interface by using instances of the UITextViewUITextField, and UILabel. You can add and configure them programmatically or by using the Interface Builder editor in Xcode. You can also turn a view of your app into a miniature web browser capable of understanding and displaying HTML, CSS, and JavaScript content. You do this using aUIWebView object.

Relevant Chapters: “Displaying Text Content in iOS,” “Typographical Concepts,” “Managing Text Fields and Text Views,” “Displaying Web Content”

When Users Edit Text, Your App Must Manage the Keyboard

When a user taps a text field, text view, or form field in a web view, iOS animates a keyboard into view. An app can control which keyboard is presented; for example, for a numeric-value field, the app should select the numeric keypad. If the entered or edited text is obscured by the keyboard, the app should adjust the view displaying the text so that the text appears above the keyboard. The delegate of a text view, text field, or web view is responsible for validating edited text and for accessing and storing edited text when the user dismisses the keyboard.

Relevant Chapters: “Managing the Keyboard”

Your App Can Draw and Manage Text Directly

Underlying the text views in UIKit is a powerful layout engine called Text Kit. If you need to customize the layout process or you need to intervene in that behavior, you can use Text Kit. Text Kit is a set of classes and protocols that provide high-quality typographical services which enable apps to store, lay out, and display text with all the characteristics of fine typesetting, such as kerning, ligatures, line breaking, and justification.

For most apps, you can use the high-level text display classes and Text Kit for all their text handling. For smaller amounts of text and special needs requiring custom solutions, you can use alternate, lower level technologies, such as the programmatic interfaces from the Core Text, Core Graphics, and Core Animation frameworks as well as other APIs in UIKit itself.

To communicate directly with the text-input system of iOS, implement the UITextInput protocol and related protocols and classes. Your app can also make use of technologies for spell checking and regular expressions.

Relevant Chapter: “Using Text Kit to Draw and Manage Text,” “Lower Level Text-Handling Technologies”

Your App Has a Range of Options for the Input and Editing of Data

The UIKit framework includes programmatic interfaces for editing the data in a view and for entering data into an app. Custom input views can replace the system keyboard to permit input of special data; input accessory views are a custom view above the system keyboard (or custom input view) that enables users to affect edited data in app-specific ways. Using UIPasteboard and related classes, an app can copy, cut, and paste data within different locations of itself or between itself and another app. As part of copy-cut-paste operations, the user taps a command on an contextual edit menu; your app manages this menu and can add custom commands to it.

Relevant Chapters:: “Copy, Cut, and Paste Operations,” “Displaying and Managing the Edit Menu,”“Custom Views for Data Input”

See Also

The Core Graphics and Core Animation frameworks have some text-handling capabilities. Core Animation, for example, offers the CATextLayer class. To learn more about these capabilities, read Quartz 2D Programming Guide (Core Graphics) and Core Animation Programming Guide.

To find out more about the Core Text framework, which is appropriate for developing higher-level text-handling frameworks, read Core Text Programming Guide and Core Text Reference Collection.

Next

时间: 2024-10-02 10:39:46

iOS 英语学习 翻译官方文档--不定时更新。的相关文章

GoogleServices 之 Location Location APIS翻译官方文档 (喷子勿喷,本人不会英语)

GoogleServices 之 Location   Location APIS翻译官方文档 Location APIS让你容易的建立定位功能的应用程序,而不需要详细的知道底层的定位技术.并且他们能让你使用硬件设备的所有资源而消耗很少的电量. 为了开始使用,首先需要建立GooglePlayServices SDK.你可以在Making Your APPLocation Aware这堂课学习如何使用这些APIS,和利用Location API reference查看详细信息. Fusedloca

MySQL学习 --来自官方文档的翻译

通用知识: 1.mysql>source path; path:要执行的sql路径 学会使用help content;里面会有详细的说明和例子 第一篇 字符集 1.基础知识 级别:服务器.数据库.表.属性 character set和collations 的区别 字符集:一组符号和其编码的集合 排序规则:符合编码的比较规则,最简单的比较规则是二进制排序规则. MySQL可以做的事情: 使用大量的字符集和排序规则组合来表示字符串,其应用水平可以在数据库.表.属性等级别. 然而要想知道如何高效利用M

学习android 官方文档

9.29 1. 今天,FQ,看到android studio中文网上有一个FQ工具openVPN,我就使用了. 之前用过一个FQ工具开眼,但由于网速慢,我就弃用了. 2. 现在,我就可以FQ去android 官方网页,认真研究android的开发 为什么要上android的官网.是因为我除了会用,也要了解开发者们对于android里面的api.组件等等,到底有什么定义和使用,这个可以让我之前的实践认识通过对比得以升华. 3. 我首先看了android delevop 的 training内容,重

Life with Adeos-xenomai(翻译官方文档)

//Life with Adeos PhilippeGerum RevisionB Copyright? 2005 Copyright ? 2005Philippe Gerum Permission is granted to copy, distribute and/or modify thisdocument under the terms of the GNU Free Documentation License, Version 1.2 orany later version publi

requests库的学习——跟随官方文档

发送GET请求: import requests r=requests.get("http://www.kekenet.com/") 如果需要传递参数可以有以下几种方法: import requests r=requests.get("http://httpbin.org/get?key1=value1&key2=value2") 或者 payload = {'key1': 'value1', 'key2': 'value2'} r=requests.get

别开心太早,Python 官方文档的翻译差远了

近几天,很多公众号发布了 Python 官方文档的消息.然而,一个特别奇怪的现象就发生了,让人啼笑皆非. Python 文档的中文翻译工作一直是“默默无闻”,几个月前,我还吐槽过这件事<再聊聊Python中文社区的翻译>,当时我们的进度是 10.3%,远远落后于日本和法国,甚至落后于巴西! 这次所谓的中文版,当然是未完成翻译的残品.刚查了下,整体进度是 19.7%. 翻译进度不足20% 有的公众号在发布消息的时候,说明了这不是官宣.不是正式发布版,还指出了中文版的访问地址是隐藏入口.这都是忠于

Android官方文档之Creating a Content Provider

写在前面的话:说两点.1.很荣幸自己的两篇文章< Android官方文档之App Components(Intents and Intent Filters)>.<Android官方文档之App Components(Common Intents)>被郭霖老师转载了,一方面说明我的博客内容得到了认可,另一方面也鞭策我继续写出质量更高的博文:2.最近在翻译官方文档,今天翻墙一看,发现页面改版了,而且居然默认显示了中文的文档(其实改版以前也有官方的中文文档,只是默认显示英文而已,另外中

Jinja2学习笔记暨官方文档的翻译

http://blog.csdn.net/lgg201/article/details/4647471 呵呵, 刚刚看完Python模板引擎Jinja2的文档, 感觉很好, 觉得动态语言真是很好.  模板引擎竟然可以做的如此灵活....真是不错.... 下面直接把看文档过程的笔记发布出来, 呵呵, 基本上就是翻译, 加了不多的一点自己的解释......希望可以帮到大家 补充: 1. 在模板中设置自定义变量: {% set variable_name = value %} 比如设置{% set u

Swift入门系列--Swift官方文档(2.2)--中文翻译--About Swift 关于Swift

About Swift 关于Swift 官方文档的翻译,仅供参考,本人英语本就不好,边学边翻译,不喜勿喷. Swift is a new programming language for iOS, OS X, watchOS, and tvOS apps that builds on the best of C and Objective-C, without the constraints of C compatibility. Swift adopts safe programming pa