您的位置:首页 > 产品设计 > UI/UE

StoryBoard segue 使用步骤

2015-06-27 21:25 555 查看
StoryBoard segue 使用步骤

来源 Storyboards tutorials in iOS7
http://www.raywenderlich.com/50308/storyboards-tutorial-in-ios-7-part-1 http://www.raywenderlich.com/50308/storyboards-tutorial-in-ios-7-part-2
Here’s a handy checklist for setting up the connections between two scenes:

Create a segue from a button or other control on the source scene to the destination scene. (If you’re presenting the new screen modally, then often the destination will be a Navigation Controller.)

Give the segue a unique Identifier. (It only has to be unique in the source scene; different scenes can use the same identifier.)

Create a delegate protocol for the destination scene.

Call the delegate methods from the Cancel and Done buttons, and at any other point your destination scene needs to communicate with the source scene.

Make the source scene implement the delegate protocol. It should dismiss the destination view controller when Cancel or Done is pressed.

Implement
prepareForSegue
: in the source view
controller and do
destination.delegate = self;
.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: