一個(gè)視圖控制器用另一個(gè)視圖控制器的視圖取代它自己的視圖。這就是模態(tài)(modal)視圖。
10年積累的成都做網(wǎng)站、成都網(wǎng)站制作經(jīng)驗(yàn),可以快速應(yīng)對(duì)客戶對(duì)網(wǎng)站的新想法和需求。提供各種問(wèn)題對(duì)應(yīng)的解決方案。讓選擇我們的客戶得到更好、更有力的網(wǎng)絡(luò)服務(wù)。我雖然不認(rèn)識(shí)你,你也不認(rèn)識(shí)我。但先網(wǎng)站設(shè)計(jì)后付款的網(wǎng)站建設(shè)流程,更有泗洪免費(fèi)網(wǎng)站建設(shè)讓你可以放心的選擇與我們合作。
A modal view (that is, a view presented modally) provides self-contained functionality in the context of the current task or workflow.
明顯的,模態(tài)視圖打斷了當(dāng)前的視圖堆棧,新生成了一個(gè)視圖,這個(gè)視圖當(dāng)然也是有視圖控制器的,你可以這么使用模態(tài)視圖:
Use them to gather information from the user immediately.
Use them to present some content temporarily.
Use them to change work modes temporarily.
Use them to implement alternate interfaces for different device orientations.
Use them to present a new view hierarchy with a specific type of animated transition (or no transition).
任何視圖控制器都可以成為模態(tài)視圖控制器。模態(tài)視圖和普通視圖之間的差異:
還是有些小差異的。
模態(tài)視圖的兩個(gè)參數(shù):
modalTransitionStyle
UIModalTransitionStyleCoverVertical
UIModalTransitionStyleFlipHorizontal
UIModalTransitionStyleCrossDissolve
UIModalTransitionStylePartialCurl
modalPresentationStyle
UIModalPresentationFullScreen
UIModalPresentationPageSheet
UIModalPresentationFormSheet
UIModalPresentationCurrentContext
這兩個(gè)參數(shù)是指過(guò)渡方式和最終的呈現(xiàn)方式。
模態(tài)視圖和顯示出它的視圖之間存在父子關(guān)系,一般都是通過(guò)父視圖來(lái)顯示和關(guān)閉:
presentModalViewController:controller animated:YES
dismissModalViewControllerAnimated:YES
模態(tài)視圖控制器和UIPopoverController的主要不同是用戶必須響應(yīng)模態(tài)視圖。
模態(tài)對(duì)話框主要有UIAlertView, UIActionSheet, UILocalNotification。這個(gè)就不一一贅述了。
關(guān)于模態(tài)視圖其實(shí)有個(gè)最重要的問(wèn)題是:為什么稱為模態(tài)?還沒(méi)想明白。
分享名稱:ios開(kāi)發(fā)--模態(tài)視圖
當(dāng)前地址:http://chinadenli.net/article12/pgoigc.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站收錄、網(wǎng)站導(dǎo)航、網(wǎng)站內(nèi)鏈、標(biāo)簽優(yōu)化、靜態(tài)網(wǎng)站、網(wǎng)站設(shè)計(jì)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)