2012年9月4日 星期二

[Xcode] Use if condition for storyboard segue push

Generally, we use storyboard seque is that drag button to destination view controller.
But if we want to do if some condition to different target view controller, should use another way.

1. Drag source view controller to destination view controller as seque push.
2. Give push identifier name.
3. Put the code [self performSegueWithIdentifier: @"goToDestination" sender: self]; to your button action.

Remember don't forget the identifier.

http://stackoverflow.com/questions/9044265/xcode-storyboard-cancel-push-if-a-condition-is-not-met

沒有留言:

張貼留言