Storyboard中segue(转场)使用

源引:http://www.2cto.com/kf/201210/161737.htmlhtml

1、视图切换类型介绍
在storyboard中,segue有几种不一样的类型,在iphone和ipad的开发中,segue的类型是不一样的。
在iphone中,segue有:pushmodal,和custom三种不一样的类型,这些类型的区别在与新页面出现的方式。
而在ipad中,有pushmodalpopoverreplacecustom五种不一样的类型。
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类型

相关文章
相关标签/搜索