源引:http://www.2cto.com/kf/201210/161737.htmlhtml
1、視圖切換類型介紹
在storyboard中,segue有幾種不一樣的類型,在iphone和ipad的開發中,segue的類型是不一樣的。
在iphone中,segue有:push,modal,和custom三種不一樣的類型,這些類型的區別在與新頁面出現的方式。
而在ipad中,有push,modal,popover,replace和custom五種不一樣的類型。
modal 模態轉換iphone
最經常使用的場景,新的場景徹底蓋住了舊的那個。用戶沒法再與上一個場景交互,除非他們先關閉這個場景。
是在viewController中的標準切換的方式,包括淡出什麼的,能夠選切換動畫。
Modalview:就是會彈出一個view,你只能在該view上操做,而不能切換到其餘view,除非你關閉了modalview.
Modal View對應的segue type就是modal segue。
*Modal:Transition to another scene for the purposes of completing a task.當user在彈出的modalview裏操做完後,就應該dismiss the modal view scene而後切換回the originalview.動畫
pushspa
Push類型通常是須要頭一個界面是個Navigation Controller的。
是在navigation View Controller中下一級時使用的那種從右側劃入的方式
*Push:Create a chain of scenes where the user can move forward or back.該segue type是和navigation viewcontrollers一塊兒使用。htm
popover(iPad only)ip
popover 類型,就是採用浮動窗的形式把新頁面展現出來
*Popover(iPad only):Displays the scene in a pop-up 「window」 over top of the current view.ci
*Replace (iPad only):開發
替換當前scene,
Replace the current scene with another. This is used in some specialized iPad viewcontrollers (e.g. split-view controller).it
customio
就是自定義跳轉方式啦。*Custom:Used for programming a customtransition between scenes.在Storyboard中使用自定義的segue類型