iphone Programming Glossary: secondviewcontrollerdismissed
dismissModalViewController AND pass data back http://stackoverflow.com/questions/6203799/dismissmodalviewcontroller-and-pass-data-back 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.. Lastly in the .m file for your first view controller implement the SecondDelegate's method for secondViewControllerDismissed void secondViewControllerDismissed NSString stringForFirst NSString thisIsTheDesiredString stringForFirst.. first view controller implement the SecondDelegate's method for secondViewControllerDismissed void secondViewControllerDismissed NSString stringForFirst NSString thisIsTheDesiredString stringForFirst And there you have it..... Now..
dismissModalViewController AND pass data back http://stackoverflow.com/questions/6203799/dismissmodalviewcontroller-and-pass-data-back 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 Dont forget.. presentModalViewController second animated YES second release Lastly in the .m file for your first view controller implement the SecondDelegate's method for secondViewControllerDismissed void secondViewControllerDismissed NSString stringForFirst NSString thisIsTheDesiredString stringForFirst And there you have it..... Now when you're about to dismiss.. animated YES second release Lastly in the .m file for your first view controller implement the SecondDelegate's method for secondViewControllerDismissed void secondViewControllerDismissed NSString stringForFirst NSString thisIsTheDesiredString stringForFirst And there you have it..... Now when you're about to dismiss the second view controller you..
dismissModalViewController AND pass data back http://stackoverflow.com/questions/6203799/dismissmodalviewcontroller-and-pass-data-back 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.. YES second release Lastly in the .m file for your first view controller implement the SecondDelegate's method for secondViewControllerDismissed void secondViewControllerDismissed NSString stringForFirst NSString thisIsTheDesiredString stringForFirst And there you.. .m file for your first view controller implement the SecondDelegate's method for secondViewControllerDismissed void secondViewControllerDismissed NSString stringForFirst NSString thisIsTheDesiredString stringForFirst And there you have it..... Now when you're about..
|