Pass NSMutableArray between two UIViewController's
- by aahrens
I have two view controllers name RootViewController and SecondViewController. In the FirstViewController I have this NSMutableArray
@interface RootViewController : UITableViewController {
NSMutableArray *allClasses;}@property (nonatomic,retain) NSMutableArray *allClasses;
In the RootViewController I populate the UITableView with all the objects within allClasses
In my SecondViewController I have
@interface SecondViewController : UIViewController <UITextFieldDelegate,UIPickerViewDelegate> {
NSMutableArray *arrayStrings;}
I have a method that adds new NSStrings to the arrayStrings. My goal is to be able to pass the arrayStrings to the RootViewController by trying something similar to allClasses = arrayStrings. That way when the RootViewController is loaded it can populate with new information.
How would I got about accomplishing that task?