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 <sanchez...@gmail.com> 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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/sanchezm95%40gmail.com

This email sent to sanchez...@gmail.com



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/wwebb%40inspiration.com

This email sent to ww...@inspiration.com

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to