I am trying to pass a NSMutableArray between ViewControllers. In the First ViewController the count returns "2" but when I pass it to the next Second ViewController the count returns "0"
First ViewController (StoryViewController):
Code:
- (void)parserDidEndDocument:(NSXMLParser *)parser{
[[[StreamViewController alloc] streamLoadingIndicator] stopAnimating];
streamLoadingIndicator.hidden = TRUE;
[[StreamViewController alloc] setStreamStories:streamStories];
[[[StreamViewController alloc] streamTable] reloadData];
//[[StreamViewController alloc] loadTableData:streamStories section:@"stream"];
}
Second ViewController (StreamViewController):
Code:
- (void)viewDidLoad {
streamStories = [[NSMutableArray alloc] init];
[[StoryParserController alloc] parseXMLFileAtURL];
locoData = [[NSMutableArray alloc] init];
NSLog(@"(%d)",[streamStories count]);
NSDictionary *nearbyStreams = [NSDictionary dictionaryWithObject:streamStories forKey:@"Proximity"];
[locoData addObject:nearbyStreams];
[super viewDidLoad];
}