1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

tabBarController, clicking an item a second time

Discussion in 'iPhone/iPad Programming' started by estupefactika, Mar 3, 2009.

  1. macrumors member

    Hi, I have a tabBarController. Each item has a ViewController. It works fine, the problem is when I click an item a second time. In the first time it load methods, I update any thing, etc... but a second time it doesnt do nothing, I would like to update some data but it doesnt load methods again

    Is there any way to solve it? Thanks
  2. macrumors member

    I believe this could be fixed by making all the tab bars under 1 view controller
  3. Moderator


    Staff Member

    Let me get this straight: you are clicking a tab bar item that is already selected, correct?
  4. macrumors member

    No, it has already been selected previously.
    All my tab bar item use the same ViewController, depending what is clicked, it display one or other things.

    - I click in tab bar item 1, it display me a table. Correct.
    - I click in tab bar item 2, it does the same, correct.
    - Now, in tab bar item 2 I update all data clicking a UIButton, it display me the table updated, correct. But If I come back to tab bar item 1, it contains the old table not updated, I need reload it. I think is because the view has already been loaded previously. I would need to reload it again. It is possible?
  5. Moderator


    Staff Member

    It is. Look into the setNeedsDisplay instance method of UIView or the reloadData instance method of UITableView.

Share This Page