• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
[iPhone] Refreshing a UITableView in a UINavigationController...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[iPhone] Refreshing a UITableView in a UINavigationController...


  • Subject: [iPhone] Refreshing a UITableView in a UINavigationController...
  • From: Brian Bruinewoud <email@hidden>
  • Date: Sun, 27 Dec 2009 15:31:46 +1100

Hi all,

I have a navigation controller based app consisting mostly of table views.
Table View 1 moves you to Table View 2 when you select a row.
When you return from Table View 2, Table View 1 needs to be updated to show the changes made.
There is no fetchedResultsController for Table View 1.
I know that Table View 1 will need to be update 90% of the time.
I've done the following in Table View 1's controller:

- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];

    if( self.beenHereBefore )
        [self.tableView reloadData];

    self.beenHereBefore = YES;
}

This solution seems to work.

My question is, is this the best way to do this and is this the best method to do it in?
Perhaps viewWillAppear is better?
Perhaps reloadData before calling super?

Thanks.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: [iPhone] Refreshing a UITableView in a UINavigationController...
      • From: Yandy Ramirez <email@hidden>
    • Re: [iPhone] Refreshing a UITableView in a UINavigationController...
      • From: Luke Hiesterman <email@hidden>
  • Prev by Date: Re: dragging to trash folder problems
  • Next by Date: Strange Problems with IBPlugin
  • Previous by thread: Re: Compile errors with Objective-C++ properties as STL/TR1 smart pointers
  • Next by thread: Re: [iPhone] Refreshing a UITableView in a UINavigationController...
  • Index(es):
    • Date
    • Thread