I'm trying to implement a feature similar to facebook and the reddit app so that when I press the news feed button while viewing the news feed it scrolls to the top. However when I press the news feed button from another tab it simply loads the cached state of the view controller. I want to have a similar feature where pressing the tab bar item associated with the current view active calls a function.
Asked
Active
Viewed 233 times
2 Answers
0
Have you tried this? set up an action with a tab bar item - iphone Then put your re-loading code within that didSelectItem method.

Community
- 1
- 1

user1549792
- 79
- 9
0
So after doing some testing I found out that the delegate call to UITabBarControllerDelegate occurs in between
viewWillAppearand
viewDidAppearso I simply set a boolean value to false in
viewWillAppearand change it in
viewDidAppear`.