SimplyKiwi
SimplyKiwi

Reputation: 12444

UIView being cached?

Ok this is a little hard to explain but here I go. On "View1" I use a UIView animation to go to "View2". The animation I do is a fade through black, switching views. I get to View2 by doing -addSubview. Now lets say we are on View2, and my action gets called to go to View3 using presentModalView. Since I need to remove the "View2" view, I do [self.view removeFromSuperview]; in my viewDidDisappear method so that the animation going to View3 is not screwed up. Here is the problem, when I go from my "View3" back to "View1" I use a presentModalView again with an animation flip. Now you know when you usually flip views, you see a background in the back of a color (usually white), instead it is my "View2". So it is like it is being cached in a way. Does anyone know why this is? If I need to post code, I can.

Upvotes: 2

Views: 1306

Answers (1)

Rui Peres
Rui Peres

Reputation: 25917

You can actually check this tutorial about using the UINavigationController:

http://www.icodeblog.com/2008/08/03/iphone-programming-tutorial-transitioning-between-views/

To hide your Navigation Bar you can actually see this post:

Is it possible use UINavigationController but hide its navigation bar (replace it with customized toolbar) and go back button

Edit 1:

Uploaded the project now here: http://www.2shared.com/file/qU-QT8fl/Project.html Read the ReadMe.text file. :P

Upvotes: 2

Related Questions