I was wondering how to use the storyboard for modular control of the controller. Personally, I prefer to work with xibs, but it seems that the storyboard is gaining popularity and will be a way to go in the future.
The way I usually installed the view controller would be like this: let's say we have ViewControllerA (A for short) and ViewControllerB (for short). Then I would usually put the protocol in Bh, specifying the delegate method when B wants to be fired, and add the id<theProtocol> delegate field as the assign property. Assuming I'm busy with A, and I want to introduce B modally, I would write:
B* b = [[B alloc] initWithNibName:@"B" bundle:nil]; b.delegate = self; [self presentModalViewController:B animated:YES];
Using the storyboard, I know that you can put another view controller in a modal way by ctrl-dragging from a button on the viewcontroller and choosing a modal transition type. I'm just curious, though; where to install the delegate of the new view controller? What is the proper practice of passing things on to your modal view controller? I really don't know what a deal with Segues is ...
source share