UIKit
構建和管理你的iOS或tvOS App圖形化鹰溜、事件驅動的用戶界面架忌。
總覽
UIKit框架為你的iOS或tvOS應用提供基礎架構吞彤。(The UIKit framework provides the required infrastructure for your iOS or tvOS apps. )它提供了用于實現(xiàn)界面的窗口和視圖體系結構,用于向應用程序提供多點觸控和其他類型輸入的事件處理基礎結構叹放,以及管理用戶饰恕,系統(tǒng)和應用程序之間交互所需的主運行循環(huán)。( 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開發(fā)進行應用程序開發(fā)
學習關于UIKit和XCode為你的iOS或tvos應用提供的基礎支持
應用結構
UIKit管理你的應用與系統(tǒng)的交互和為你提供管理應用的數(shù)據(jù)和資源的類。(UIKit manages your app's interactions with the system and provides classes for you to manage your app's data and resources.)
核心應用程序
管理你的應用的數(shù)據(jù)模型和它與系統(tǒng)的交互难礼。(Manage your app's data model and its interactions with the system.)
資源管理
管理你在主執(zhí)行文件之外存儲的圖片吱七、字符串、故事板和nib文件鹤竭。(Manage the images, strings, storyboards, and nib files that you store outside your main executable.)
應用擴展
擴展你的應用基礎功能到系統(tǒng)的其他部分踊餐。(Extend your app's basic functionality to other parts of the system.)(谷歌翻譯:將應用的基礎功能擴展到系統(tǒng)的其他部分)
用戶界面
視圖幫助你將內容顯示到屏幕上和促進用戶交互;視圖控制器幫助你管理界面的視圖和結構臀稚。(Views help you display content onscreen and facilitate user interactions; view controllers help you manage views and the structure of your interface.)
視圖和控制器
呈現(xiàn)你的內容到屏幕上吝岭,并定義和該內容支持的交互。(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提供類和協(xié)議幫助你配置你的繪圖環(huán)境并呈現(xiàn)你的內容幽勒。(UIKit provides classes and protocols that help you configure your drawing environment and render your content.)
圖片和PDF
創(chuàng)建和管理圖片,包括那些使用位圖和PDF的格式刀荒。(Create and manage images, including those that use bitmap and PDF formats.)
繪圖
使用渲染器來配置你的應用程序的繪圖環(huán)境,并繪制路徑棘钞,文字及陰影缠借。(Configure your app's drawing environment using renderers, and draw paths, strings, and shadows.)
打印
顯示系統(tǒng)的打印板和管理打印過程砖织。(Display the system print panels and manage the printing process.)
文本
除了可以在應用中輕松顯示文本的文本視圖外劝堪,UIKit還提供了支持系統(tǒng)鍵盤的自定義文本管理和渲染州泊。(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.)
鍵盤和輸入
配置系統(tǒng)鍵盤叫乌,或者創(chuàng)建你自己的鍵盤來自己處理輸入柴罐。(Configure the system keyboard, or create your own keyboards and handle input yourself.)