you can return to your storyboard by simply rejecting the modal view controller. Like this:
- (IBAction)backPressed:(id)sender { [self dismissModalViewControllerAnimated:YES]; }
You must put this method in your ShowDreamNIBController. Regarding the second question, you can send back information to the view controller that the modal view controller introduced by receiving a link to it using delegation.
EDIT: To βsend information to XIB,β do you mean that you want to set the information on the view controller that you want to present? If so, than using this when you present a modal controller:
ShowDreamNIBController *detailViewController = [[ShowDreamNIBController alloc]initWithNibName:nil bundle:nil]; [detailViewController setSomething: something]; [detailViewController setAnotherThing: anotherThing]; [self presentModalViewController:detailViewController animated:nil];
Hope this helps.
source share