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

本文的原始頁面鏈接

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.)

?著作權歸作者所有,轉載或內容合作請聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個濱河市憨奸,隨后出現(xiàn)的幾起案子革屠,更是在濱河造成了極大的恐慌,老刑警劉巖,帶你破解...
    沈念sama閱讀 218,451評論 6 506
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件似芝,死亡現(xiàn)場離奇詭異那婉,居然都是意外死亡,警方通過查閱死者的電腦和手機党瓮,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 93,172評論 3 394
  • 文/潘曉璐 我一進店門详炬,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人寞奸,你說我怎么就攤上這事呛谜。” “怎么了蝇闭?”我有些...
    開封第一講書人閱讀 164,782評論 0 354
  • 文/不壞的土叔 我叫張陵呻率,是天一觀的道長。 經(jīng)常有香客問我呻引,道長礼仗,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 58,709評論 1 294
  • 正文 為了忘掉前任逻悠,我火速辦了婚禮元践,結果婚禮上,老公的妹妹穿的比我還像新娘童谒。我一直安慰自己单旁,他們只是感情好,可當我...
    茶點故事閱讀 67,733評論 6 392
  • 文/花漫 我一把揭開白布饥伊。 她就那樣靜靜地躺著象浑,像睡著了一般。 火紅的嫁衣襯著肌膚如雪琅豆。 梳的紋絲不亂的頭發(fā)上愉豺,一...
    開封第一講書人閱讀 51,578評論 1 305
  • 那天,我揣著相機與錄音茫因,去河邊找鬼蚪拦。 笑死,一個胖子當著我的面吹牛冻押,可吹牛的內容都是我干的驰贷。 我是一名探鬼主播,決...
    沈念sama閱讀 40,320評論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼洛巢,長吁一口氣:“原來是場噩夢啊……” “哼括袒!你這毒婦竟也來了?” 一聲冷哼從身側響起稿茉,我...
    開封第一講書人閱讀 39,241評論 0 276
  • 序言:老撾萬榮一對情侶失蹤箱熬,失蹤者是張志新(化名)和其女友劉穎类垦,沒想到半個月后,有當?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體城须,經(jīng)...
    沈念sama閱讀 45,686評論 1 314
  • 正文 獨居荒郊野嶺守林人離奇死亡蚤认,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內容為張勛視角 年9月15日...
    茶點故事閱讀 37,878評論 3 336
  • 正文 我和宋清朗相戀三年,在試婚紗的時候發(fā)現(xiàn)自己被綠了糕伐。 大學時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片砰琢。...
    茶點故事閱讀 39,992評論 1 348
  • 序言:一個原本活蹦亂跳的男人離奇死亡,死狀恐怖良瞧,靈堂內的尸體忽然破棺而出陪汽,到底是詐尸還是另有隱情,我是刑警寧澤褥蚯,帶...
    沈念sama閱讀 35,715評論 5 346
  • 正文 年R本政府宣布挚冤,位于F島的核電站,受9級特大地震影響赞庶,放射性物質發(fā)生泄漏训挡。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點故事閱讀 41,336評論 3 330
  • 文/蒙蒙 一歧强、第九天 我趴在偏房一處隱蔽的房頂上張望澜薄。 院中可真熱鬧,春花似錦摊册、人聲如沸肤京。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,912評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽忘分。三九已至,卻和暖如春白修,著一層夾襖步出監(jiān)牢的瞬間妒峦,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 33,040評論 1 270
  • 我被黑心中介騙來泰國打工熬荆, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留舟山,地道東北人绸狐。 一個月前我還...
    沈念sama閱讀 48,173評論 3 370
  • 正文 我出身青樓卤恳,卻偏偏與公主長得像,于是被迫代替她去往敵國和親寒矿。 傳聞我的和親對象是個殘疾皇子突琳,可洞房花燭夜當晚...
    茶點故事閱讀 44,947評論 2 355

推薦閱讀更多精彩內容