Question

I have a 3 tab view controller. One of the tabs has a table view retrieved from a JSON request/response. When I initially go to this tab, the table loads fine from the viewDidLoad. But when I go to another tab and come back to the table view tab, it still has the old table values. i want to make another JSON request and display the response. How do I request another JSON request when the use comes back to this tab?

Était-ce utile?

La solution

How Douglas said in the comment, add your reload-function in the viewWillAppear

-(void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    [self reloadMyData];
}
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top