scenes are connected by segue objects, which represent a transition between two view controllers.A Segue Manages the Transition Between Two ScenesYou can set the type of transition (for example, modal or push) on a segue. Additionally, you can subclass a segue object to implement a custom transition.You can pass data between scenes with the method prepareForSegue:sender:, which is invoked on the view controller when a segue is triggered. This method allows you to customize the setup of the next view controller before it appears on the screen. Transitions usually occur as the result of some event, such as a button being tapped, but you can programmatically force a transition by calling performSegueWithIdentifier:sender: on the view controller.
[总结]
Segue,英文本意:继续
此处感觉是:
如果你希望从页面视图A,继续,切换,转换,显示到,下一个页面视图B的时候,则就是用:Segue
去实现:
两个不同的页面之间的切换,转换
在两个页面切换期间需要传递数据的话,用:prepareForSegue
页面转换一般都是某个时间触发的,比如按了按钮
你也可以通过代码方式强制转换页面:performSegueWithIdentifier
转载请注明:在路上 » 【整理】Cocoa中的Segue