Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS

Getting data from view controllers

I am trying to get data from the hierarchyTableViewController and store it in the addItemViewController array. I am able to create the object for the source but when i try to pass the array to the destination array, it only passes in a null, what do I do?

<code> -(void) viewWillAppear:(BOOL)animated { [super viewWillAppear:YES];

hierarchyTableViewController* source = [[hierarchyTableViewController alloc] init];

self.classArray = [[NSArray alloc]initWithArray:source.classHierarchyArray];

//The problem is not that the array isn't getting passed but that it has no elements in it which the picker view can display

} </code>