第一天-UIKit----2018-05-28

本文的原始页面链接

UIKit

构建和管理你的iOS或tvOS App图形化、事件驱动的用户界面。

总览

UIKit框架为你的iOS或tvOS应用提供基础架构。(The UIKit framework provides the required infrastructure for your iOS or tvOS apps. )它提供了用于实现界面的窗口和视图体系结构,用于向应用程序提供多点触控和其他类型输入的事件处理基础结构,以及管理用户,系统和应用程序之间交互所需的主运行循环。( It provides the window and view architecture for implementing your interface, the event handling infrastructure for delivering Multitouch and other types of input to your app, and the main run loop needed to manage interactions among the user, the system, and your app.)
该框架提供的特性包括动画支持、文件支持、打印和绘图支持、当前设备的信息、文本管理和显示、搜索支持、可访问性支持、应用扩展支持和资源管理器。(Other features offered by the framework include animation support, document support, drawing and printing support, information about the current device, text management and display, search support, accessibility support, app extension support, and resource management.)

important
Use UIKit classes only from your app’s main thread or main dispatch queue, unless otherwise indicated. This restriction particularly applies to classes derived from UIResponder or that involve manipulating your app’s user interface in any way.

重要
除非另有说明,否则只能从您的应用的主线程或主调度队列中使用UIKit类。 此限制特别适用于从UIResponder派生的类或涉及以任何方式操纵应用程序用户界面的类。

主题

第一步 关于使用UIKit开发进行应用程序开发

学习关于UIKit和XCode为你的iOS或tvos应用提供的基础支持

应用结构

UIKit管理你的应用与系统的交互和为你提供管理应用的数据和资源的类。(UIKit manages your app's interactions with the system and provides classes for you to manage your app's data and resources.)

核心应用程序

管理你的应用的数据模型和它与系统的交互。(Manage your app's data model and its interactions with the system.)

资源管理

管理你在主执行文件之外存储的图片、字符串、故事板和nib文件。(Manage the images, strings, storyboards, and nib files that you store outside your main executable.)

应用扩展

扩展你的应用基础功能到系统的其他部分。(Extend your app's basic functionality to other parts of the system.)(谷歌翻译:将应用的基础功能扩展到系统的其他部分)

用户界面

视图帮助你将内容显示到屏幕上和促进用户交互;视图控制器帮助你管理界面的视图和结构。(Views help you display content onscreen and facilitate user interactions; view controllers help you manage views and the structure of your interface.)

视图和控制器

呈现你的内容到屏幕上,并定义和该内容支持的交互。(Present your content onscreen and define the interactions allowed with that content.)

视图控制器

使用视图控制器管理你的应用,并促进围绕您内容的导航。(Manage your interface using view controllers and facilitate navigation around your app's content.)

视图布局

使用堆栈视图来自动布局你的界面上的视图。当你需要精确放置视图时使用自动布局。(Use stack views to lay out the views of your interface automatically. Use Auto Layout when you require precise placement of your views.)

动画和触觉

使用基于视图的动画和触觉像用户提供反馈。(Provide feedback to users using view-based animations and haptics.)

窗口和屏幕

为你的视图层次结构和其它内容提供一个容器。(Provide a container for your view hierarchies and other content.)

用户交互

响应者和手势识别器帮助你解决触摸,键盘输入和其它事件。使用拖放功能,聚焦功能,窥视功能和弹出功能以及辅助功能去解决与你的内容进行其它类型的用户交互。(Responders and gesture recognizers help you handle touches, keyboard input, and other events. Use drag and drop, focus, peek and pop, and accessibility to handle other types of user interactions with your content.)

触摸,按压和手势

在手势识别器中封装你的应用事件处理逻辑,以便于你可以在整个应用中重复使用该代码。(Encapsulate your app's event-handling logic in gesture recognizers so that you can reuse that code throughout your app.)

拖放

你的视图通过使用交互API给你的应用带来拖放功能。(Bring drag and drop to your app by using interaction APIs with your views.)

焦点交互

使用远程或游戏控制器导航你的UIKit应用程序的界面。(Navigate the interface of your UIKit app using a remote or game controller.)

窥视

使用3D触摸输入来显示你的内容的自定义预览和操作。(Use 3D Touch input to display custom previews and actions for your content.)

键盘和菜单

处理键盘输入和显示自定义操作菜单。(Handle keyboard input, and display a menu of custom actions.)

辅助操作

使残障用户更容易使用你的应用。(Make your app more accessible to users with disabilities.)

图像、绘画和打印

UIKit提供类和协议帮助你配置你的绘图环境并呈现你的内容。(UIKit provides classes and protocols that help you configure your drawing environment and render your content.)

图片和PDF

创建和管理图片,包括那些使用位图和PDF的格式。(Create and manage images, including those that use bitmap and PDF formats.)

绘图

使用渲染器来配置你的应用程序的绘图环境,并绘制路径,文字及阴影。(Configure your app's drawing environment using renderers, and draw paths, strings, and shadows.)

打印

显示系统的打印板和管理打印过程。(Display the system print panels and manage the printing process.)

文本

除了可以在应用中轻松显示文本的文本视图外,UIKit还提供了支持系统键盘的自定义文本管理和渲染。(In addition to text views that make it easy to display text in your app, UIKit provides custom text management and rendering that supports the system keyboards.)

文本显示和字体

使用UIKit视图可以显示文本,管理字体,与检查拼写。(Use UIKit views to display text, manage fonts, and check spelling.)

文本存储

管理文本存储,和约束文本的布局。(Manage text storage, and coordinate the layout of text.)

键盘和输入

配置系统键盘,或者创建你自己的键盘来自己处理输入。(Configure the system keyboard, or create your own keyboards and handle input yourself.)

©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 194,524评论 5 460
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 81,869评论 2 371
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 141,813评论 0 320
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 52,210评论 1 263
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 61,085评论 4 355
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 46,117评论 1 272
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 36,533评论 3 381
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 35,219评论 0 253
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 39,487评论 1 290
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 34,582评论 2 309
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 36,362评论 1 326
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 32,218评论 3 312
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 37,589评论 3 299
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 28,899评论 0 17
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 30,176评论 1 250
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 41,503评论 2 341
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 40,707评论 2 335

推荐阅读更多精彩内容