开发者

self.tabBarController.selectedIndex not calling viewDidAppear:YES

开发者 https://www.devze.com 2023-02-21 00:31 出处:网络
In a tabbar view when I call the tab to load useing self.tabBarController.selectedIndex the viewWillAppear is not called If i am been to the tab before hand is there a开发者_运维百科 way to force the

In a tabbar view when I call the tab to load useing self.tabBarController.selectedIndex the viewWillAppear is not called If i am been to the tab before hand is there a开发者_运维百科 way to force the view to reload.

self.tabBarController.selectedIndex = 3; [self.tabBarController.selectedViewController viewDidAppear:YES];

I was also thanking of dumping memory ever time i change tab's and that way when i get back to that view it reloads from the database.


you can implement

- (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController

in the UITabBarControllerDelegate (probably your app delegate). Then in there you can manually call the methods you want on whichever index's viewController you selected.

0

精彩评论

暂无评论...
验证码 换一张
取 消