I'm developing an application. In it I need to pass an array from one view controller to another view controller.
How can I do this?
See Question&Answers more detail:osI'm developing an application. In it I need to pass an array from one view controller to another view controller.
How can I do this?
See Question&Answers more detail:osyou can do it by defining an array property in second viewcontrollers .h file like:
@interface SecondViewController : UIViewController
@property(nonatomic, strong)NSArray *array;
@end
Now in FirstViewconrtoller just pass it
SecondViewController *controller = [[SecondViewController alloc]....]
controller.array = yourArray.//the array you want to pass