URGENT: Disable reloading of view when UITabBar item is re-clicked

Discussion in 'iOS Programming' started by tobs, Mar 9, 2010.

  1. tobs macrumors newbie

    Joined:
    Mar 9, 2010
    #1
    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.
     
  2. jnic macrumors 6502a

    Joined:
    Oct 24, 2008
    Location:
    Cambridge
    #2
    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.
     

Share This Page