Hello -

I am a bit confused on when or why a view is cached and what is the best possible way to clear it.

First:

I have a UITabBarController. The views that this brings up are cached. This is actually great as I can test to see if something is changed and if so, do nothing and it brings up my view quick. So far so good. However, when I issue a viewWillAppear it seems that instead of "re- creating" my view it is actually overlaying my new image views on it without the old ones going away. I have done something like:

NSEnumerator *itemEnum = [ [veggieScrollView subviews] objectEnumerator];
                UIView *tView;
                while (tView = [itemEnum nextObject]) {
                        if([tView tag]==101)[tView removeFromSuperview];
                }

And it clears those images but that seems rather poor to me and that their must be a better and cleaner way.

Now I also have views that I popup from those parent views above and they DON'T cache the view so they have to be reconstituted in their viewWillAppear each time. This is bad because those popups have content that never changes once the program loads.
So in their case, I want them to be cached.

Any help would be greatly appreciated.

James Cicenia

_______________________________________________

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