I am using multiple view controllers associated with a corresponding tab.
I need to be able to move from tab2 to tab1 and to initialize my previous view controller associated with tab1 just as if I had open the tab for the first time when app launches. However, it does not initialize it like I expect when I switch tabs. This is what I have tried:.
In my view controller1, I have table data that has navigation to another ViewController. I applied changes to view will disappear but no result.
-(void)viewWillDisappear:(BOOL)animated
{
appDelegate.select = nil;
[tableCat reloadData];
NSLog(@"hello");
}
Can any one please help me?
Try using the
viewWillAppear:method instead to initialize the view how you want it. This method is called before it is actually shown, so it should do what you want.