phoganuci
phoganuci

Reputation: 5064

iPhone UITabBarController question: How to change previous view of a tab upon return to that tab?

Is there a simple way, when returning to the primary tab on a UITabBar, for one to swap out the view that was last displayed in that tab for a new one? Would this be with the ViewDidAppear method? How would I keep this from happening on the initial load? Perhaps initialize a counter to control this? Any input is greatly appreciated.

Upvotes: 0

Views: 262

Answers (1)

Deepak Danduprolu
Deepak Danduprolu

Reputation: 44633

You should implement the UITabBarDelegate's tabBar:didSelectItem: method and replace the view there. You can use a BOOL to make the switch.

Upvotes: 1

Related Questions