Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

tobs

macrumors newbie
Original poster
Mar 9, 2010
1
0
Hi,

Is there a way to disable reloading of view when UITabBar item is clicked? The scenario is this, I have a UITabBar that contains 4 UITabBar items (item1, item2, item3, item4). I know that when you clicked on a Tab Bar item, its designated view will load.

For example, when the user clicks on item2, the view of that tab bar item will load and the focus tab bar item will be item2, (and now here goes my problem) but what if after the first click on item2 was done, the user again clicks on the same tab bar item (item2), the designated view will again be reloaded, which i really dont want to happen. I also know that I can just disable the tab bar item but the item will not be highlighted (which signifies that its is the current focus on the app) so i did not go with this.

Is disabling the reloading of view after the tab bar item is re-clicked even possible? Any inputs will be greatly appreciated. Thank you.
 
Why would you want to prevent reloading a view?

If it's because you're doing setup in the viewDidLoad or loadView methods, then this should be done in your init method instead.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.