简体   繁体   中英

iOS Programming how to refresh a view with in a tabbar item

hey guys i have a tab bar based app and it has a view controller on a tab which receives data from user i want to save that data by nsuserdefaults and show that saved data in another tab's first view controller. But the problem is after saving in the first whenever the mentioned tab is clicked the saved data is not refreshed there in that view.how to reload that view.

i know because it is a tabbar so neither viewDidLoad nor viewWillAppear is called on click of that tab.

i want that view to reload each time whenever tab is clicked/tapped

Please help me.

i had the same problem but i'm trying to solve by taking tabbar delegate and using one of its method:

- (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item

hope this works

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM