Most iOS apps are built using components from UIKit, a programming framework that defines common interface elements. This framework lets apps achieve a consistent appearance across the system, while at the same time offering a high level of customization. UIKit elements are flexible and familiar. They’re adaptable, enabling you to design a single app that looks great on any iOS device, and they automatically update when the system introduces appearance changes. The interface elements provided by UIKit fit into three main categories:
大多數(shù)iOS app 使用 UIKit 的組件來(lái)創(chuàng)建。UIKit是一個(gè)編程框架,可以定義普通界面元素。這個(gè)框架讓app在整個(gè)系統(tǒng)中外觀表現(xiàn)一致,與此同時(shí)提供高階的定制。UIKit 元素靈活且常見。他們適應(yīng)性強(qiáng),讓你設(shè)計(jì)一個(gè)APP在任何iOS設(shè)備看上去都很好, 并且當(dāng)系統(tǒng)引入外觀改變時(shí)他們會(huì)自動(dòng)升級(jí)。UIKit提供的界面元素適用3種主要類目:
Bars.Tell people where they are in your app, provide navigation, and may contain buttons or other elements for initiating actions and communicating information.
欄目(Bars),提供導(dǎo)航,指示用戶他們?cè)谀睦铮部梢园粹o或者其它觸發(fā)動(dòng)作的元素和交流信息。
Views.Contain the primary content people see in your app, such as text, graphics, animations, and interactive elements. Views can enable behaviors such as scrolling, insertion, deletion, and arrangement.
視圖(Views),包含用戶app里看到的基本內(nèi)容,如文本,圖形,動(dòng)畫,和交互元素。視圖能啟用行為,如滾動(dòng),插入,刪除,排序。
Controls.Initiate actions and convey information. Buttons, switches, text fields, and progress indicators are examples of controls.
控制器(Controls),監(jiān)聽動(dòng)作或傳遞信息。按鈕,切換,文本輸入,和進(jìn)度指示都是控制器的例子。
In addition to defining the interface of iOS, UIKit defines functionality your app can adopt. Through this framework, for example, your app can respond to gestures on the touchscreen and enable features such as drawing, accessibility, and printing.
除了定義iOS的界面,UIkit 也定義了app可以采用的功能。舉個(gè)例子,通過(guò)這個(gè)框架app能夠在觸摸屏上識(shí)別手勢(shì)和啟用特性 ,如繪圖,存取訪問(wèn)和打印。
iOS tightly integrates with other programming frameworks and technologies too, such as Apple Pay, HealthKit, and ResearchKit, enabling you to design amazingly powerful apps.
iOS也緊密的集成了其它程序框架和技術(shù),如蘋果支付(Apple Pay), 健康工具(HealthKit),和調(diào)查工具(ResearchKit)。