UITabView Reload Table When Click On UITabBarItem

Discussion in 'iOS Programming' started by computerartist, Nov 23, 2010.

  1. computerartist macrumors newbie

    Joined:
    Sep 4, 2010
    #1
    I have a program the loads has a UITableView with a UITabBar. What it does is from a different tab, you can save an article and it appends an array and saves it with "writeToFile." Alll of that is working correctly. What it then does though is I have another tab that loads that array into a UITable.

    So what I am having a problem with is:

    I want the table to reload every time that tab is clicked on with

    Code:
    [self.tableView reloadData];
    


    I can't get this to work though?

    I tried to put the code in all of the init, viewDidLoad, viewDidAppear, viewWillAppear methods and if I NSLog to see if those methods are being called I get it to print out the NSLog, but the [self.tableView reloadData]; code isnt working.
     
  2. computerartist thread starter macrumors newbie

    Joined:
    Sep 4, 2010
    #2
    Nevermind.

    Stupid mistake.

    I had to call the initWithContentsOfFile class inside the viewDidAppear method...
     

Share This Page