I have an one initial view controller(A) and one navigation controller link to another view controller(B). How do i pass in the array from A to Big through segue?
This is my code for the segue.
-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
NSLog(@"prepareForSegue: %@", segue.identifier);
if ([segue.identifier isEqualToString:@"severityInfo"]) {
UINavigationController *segueNavigation = [segue destinationViewController];
NSLog(@"%@",[[segueNavigation viewControllers]objectAtIndex:0]);
IncidentOverviewViewController *B = (IncidentOverviewViewController *)[[segueNavigation viewControllers]objectAtIndex:0];
B.BArray = feeds;
}
}
I have this error after running this code: reason: '-reason: 'Could not find a navigation controller for segue 'severityInfo'. Push segues can only be used when the source controller is managed by an instance of UINavigationController.'
I have declare the method in my second view controller(incident view controller) which looks like this:
-(void)setFeeds:(NSMutableArray*)received
{
BArray = received;
NSLog(@"feeds are%@", BArray);
}
I have insert the identifier in the storyboard for the segue from my initial view controller call "view controller" this initial view controller is connected to a navigation view controller then from the navigation view controller connection to my destination view controller call "incidentOverviewViewController"