There are three kinds of segues, push, modal and custom. You’ll probably most often use the ‘push’ method. It is incredibly useful in making storyboards do stuff.
Primarily there are two ways to invoke a segue. One is to rig up a button in Interface Builder that triggers a segue. The other is to invoke the segue on your own. I think that a lot of times I need to validate what’s on the screen before I can release it to the next controller. Therefore I need to do it myself.
Also you need to pass information back and forth, which will be taken care of by setting variables in the method:
-(void) prepareForSegue:(UIStoryBoardSegue *)segue sender:(id)sender { //... } |