• 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
Re: Resetting the TableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Resetting the TableView


  • Subject: Re: Resetting the TableView
  • From: Wyatt Webb <email@hidden>
  • Date: Thu, 8 Jan 2009 16:28:50 -0800

Have a look at viewWillAppear/viewDidAppear and viewWillDisappear/ viewDidDisappear on the UIViewController class

You could clear out the table data on the disappear step (so you aren't holding data you don't need) or wait for the appear phase to set up your data before it's shown. These get called as you push and pop the controllers. The viewdidLoad is just like it sounds. It only gets called when the view is created or loaded from the NIB (which may happen more than once if you have a low memory situation as, I believe, the UIViewController can release it's view if it's not in use). In your normal case, the view is loaded the first time and then kept around as you move it on and off the navigation stack.

HTH,

Wyatt

On Jan 8, 2009, at 4:16 PM, Mohan Parthasarathy wrote:

Yes, but where will call this when the ViewController is being made active.
The new view was filled with data previously and i need a chance to reset
it. Could you explain in little bit more detail ?


thanks
mohan


On Thu, Jan 8, 2009 at 4:04 PM, sanchezm <email@hidden> wrote:

UITableView has a reloadData method

- Miguel


On Jan 8, 2009, at 3:58 PM, Mohan Parthasarathy wrote:

Hi,

I try to reuse UIViewControllers in didSelectatRowIndexPath. The new View
has a table which is filled with data eventually. Later the view gets
popped
and when reusing the same ViewController the table shows old data. Is
there
a way to clear the data while still reusing ViewControllers (as
recommended). I tried in viewdidLoad etc. but it seems to get called only
once the first time the View was created.


thanks
mohan
_______________________________________________

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



_______________________________________________

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

_______________________________________________

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: Resetting the TableView
      • From: "Mohan Parthasarathy" <email@hidden>
References: 
 >Resetting the TableView (From: "Mohan Parthasarathy" <email@hidden>)
 >Re: Resetting the TableView (From: sanchezm <email@hidden>)
 >Re: Resetting the TableView (From: "Mohan Parthasarathy" <email@hidden>)

  • Prev by Date: Re: Resetting the TableView
  • Next by Date: Re: NSDecimalNumber seen as NSCFNumber; a bug?
  • Previous by thread: Re: Resetting the TableView
  • Next by thread: Re: Resetting the TableView
  • Index(es):
    • Date
    • Thread