ios開發(fā)--模態(tài)視圖

         一個視圖控制器用另一個視圖控制器的視圖取代它自己的視圖。這就是模態(tài)(modal)視圖。

10年積累的成都做網(wǎng)站、成都網(wǎng)站制作經(jīng)驗,可以快速應對客戶對網(wǎng)站的新想法和需求。提供各種問題對應的解決方案。讓選擇我們的客戶得到更好、更有力的網(wǎng)絡服務。我雖然不認識你,你也不認識我。但先網(wǎng)站設計后付款的網(wǎng)站建設流程,更有泗洪免費網(wǎng)站建設讓你可以放心的選擇與我們合作。

         A modal view (that is, a view presented modally) provides self-contained functionality in the context of the current task or workflow.

         明顯的,模態(tài)視圖打斷了當前的視圖堆棧,新生成了一個視圖,這個視圖當然也是有視圖控制器的,你可以這么使用模態(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)視圖和普通視圖之間的差異:

ios開發(fā)--模態(tài)視圖

還是有些小差異的。

        模態(tài)視圖的兩個參數(shù):

modalTransitionStyle

      UIModalTransitionStyleCoverVertical

      UIModalTransitionStyleFlipHorizontal

      UIModalTransitionStyleCrossDissolve

      UIModalTransitionStylePartialCurl

modalPresentationStyle

      UIModalPresentationFullScreen

      UIModalPresentationPageSheet

      UIModalPresentationFormSheet

      UIModalPresentationCurrentContext

這兩個參數(shù)是指過渡方式和最終的呈現(xiàn)方式。

        模態(tài)視圖和顯示出它的視圖之間存在父子關系,一般都是通過父視圖來顯示和關閉:

        presentModalViewController:controller    animated:YES

        dismissModalViewControllerAnimated:YES

 

模態(tài)視圖控制器和UIPopoverController的主要不同是用戶必須響應模態(tài)視圖。

 

模態(tài)對話框主要有UIAlertView, UIActionSheet, UILocalNotification。這個就不一一贅述了。

 

關于模態(tài)視圖其實有個最重要的問題是:為什么稱為模態(tài)?還沒想明白。

 

 

分享名稱:ios開發(fā)--模態(tài)視圖
當前地址:http://muchs.cn/article12/pgoigc.html

成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站收錄、網(wǎng)站導航、網(wǎng)站內(nèi)鏈標簽優(yōu)化、靜態(tài)網(wǎng)站、網(wǎng)站設計

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

成都seo排名網(wǎng)站優(yōu)化