dismissModalViewController AND pass data back
You need to use delegate protocols… Here’s how to do it: Declare a protocol in your secondViewController’s header file. It should look like this: #import <UIKit/UIKit.h> @protocol SecondDelegate <NSObject> -(void)secondViewControllerDismissed:(NSString *)stringForFirst @end @interface SecondViewController : UIViewController { id myDelegate; } @property (nonatomic, assign) id<SecondDelegate> myDelegate; Don’t forget to synthesize the myDelegate in your implementation (SecondViewController.m) … Read more