0

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.

2 Answers2

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
0

So after doing some testing I found out that the delegate call to UITabBarControllerDelegate occurs in betweenviewWillAppearandviewDidAppearso I simply set a boolean value to false inviewWillAppearand change it inviewDidAppear`.