Deepak Singh Negi
Deepak Singh Negi

Reputation: 669

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.

Upvotes: 1

Views: 1477

Answers (1)

iPhone Developer 2011
iPhone Developer 2011

Reputation: 116

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

Upvotes: 1

Related Questions