Refresh a tab in xcode?
Is there a way to refresh a tab's content in XCode? I'm s开发者_如何学运维etting a tab as follows: [[dappDelegate tabBarController] setSelectedIndex:1];
However, when I try and do it from a different screen, the same tab screen is still selected. Is there a way to have the tab completely reload the data?
Thanks, Graeme.
I use a hack around that seems to work for my case:
if(tabBarController.selectedIndex == 1)
{
[tabBarController setSelectedIndex:-1];
[tabBarController setSelectedIndex:1];
}
else
{
[tabBarController setSelectedIndex:1];
}
精彩评论