I know that this question has been asked several times already, but after extensive search, none of them work for me so far. I want to avoid using a singleton if possible. Sorry if this is considered a repeat question.
I have a MutableArray with 5 objects in my ViewController.m file called storyList. I want to be able to access this storyList array in my DetailViewController.m file.
One method I have tried is: (storyListArrayinDetail is a new array in detailviewcontroller, storyList is the array with 5 objects from ViewController.h) In ViewController.h
DetailViewController *controller;
In ViewController.m
controller = [[DetailViewController alloc]init];
controller.storyListArrayinDetail = [[NSMutableArray alloc]init];
controller.storyListArrayinDetail = storyList;
When I log controller.storyListArrayinDetail in ViewController.m, I get the correct array of 5 objects. However, when I log storyListArrayinDetail in DetailViewController.m, I get nothing.