Hi am new to iphone developing, am doing my projects using storyboards, in my project i have login viewController if login success it will go to tabbarcontroller. In the tabbarController it has three viewControllers. between tabbarController and three view controllers i have an navigation controller.now the problem is i have to pass data from loginviewController to tabBarcontroller to navigationController . I dont know how to do it pls help me.. Thanks in advance i passed data from login controller to tabbarcontroller using this code
-(void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{
NSString * segueIdentifier = [segue identifier];
if([segueIdentifier isEqualToString:@"dashboard"]){
EventdashViewController *dc = [[EventdashViewController alloc] init];
FeedDashViewController *fc = [[FeedDashViewController alloc]init];
NewsDashViewController *nc = [[NewsDashViewController alloc]init];
UITabBarController* tbc = [segue destinationViewController];
dc = (EventdashViewController *)[[tbc customizableViewControllers] objectAtIndex:0];
dc.memberid = userid1;
NSLog(@"%d",dc.memberid);
fc = (FeedDashViewController *) [[tbc customizableViewControllers]objectAtIndex:1];
fc.memberid=userid1;
NSLog(@"%d",fc.memberid);
nc = (NewsDashViewController *)[[tbc customizableViewControllers]objectAtIndex:2];
nc.memberid = userid1;
NSLog(@"%d",nc.memberid);
}
}
How to pass data from viewcontroller to tabbarcontroller to navigationcontroller?