Question: I have a `UIViewController` class and a `UITableViewController` class. Within the `UIViewController` class I have an `NSMutableArray`.

I now have the issue of how to load data into my table view, a separate class, I must access the `NSMutableArray` I used to populate the previous `UIViewController` class. 

I tried using a delegate to access the array in the `UIViewControllerClass` however the array had "0 objects" and was `NULL` 

I would appreciate some guidance in the right direction here.

Answer: 
You could have one view controller hold a reference to the other view controller and query the public `NSMutableArray` on it for data. Aaron suggested this and it might be your best solution.

Or.. you have multiple view controllers trying to access the same set of data. Potentially you have other classes which will want to access this data also. You might want to consider pulling the data out of the view controller and storying it in a neutral location. You could store it in the `AppDelegate` and then reference the app delegates from any place you need it.

```
id<UIApplicationDelegate> appDelegate = [UIApplication sharedApplication].delegate;
NSMutableArray *myData = appDelegate.data;

```

You could also consider pulling all the logic of your data and the data itself into a separate class and [use a Singleton](https://stackoverflow.com/questions/7568935/how-do-i-implement-an-objective-c-singleton-that-is-compatible-with-arc) It would allow you to access/manipulate the data fairly easy from anywhere. 

The last 2 methods would insulate data from user interface controller objects and prevent the need from potentially unrelated objects needing to hold references to one another. Used properly it will reduce code complexity and mage future changes easier to manage.
Create an `NSMutableArray` property on your `UITableViewController` class like so:

```
@interface CustomTableViewController : UITableViewController

@property (strong, nonatomic) NSMutableArray *dataFromOtherClass;

@end

```

And then when you transition, perhaps like this, you can set the `dataFromOtherClass` property:

```
CustomTableViewController *controller = [[CustomTableViewController alloc] initWithNibName:@"CustomTableViewController" bundle:nil];

controller.dataFromOtherClass = myNSMutableArrayData; // <-- Set data like this        

[self.navigationController controller animated:YES];

// Or ...
[self presentViewController:controller animated:YES];

// Etc...

```