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.
2
votes
I think that Apple recommends using a separate view controller for each separate "screen". I know this isn't really an answer, but it may go more smoothly if you roll with the framework.
- Joe Osborn
It is a separate view controller. I am adding a separate view controller (another xib), as a subview.
- SimplyKiwi
View controllers should be permitted to control their own views, I thinkâyou may have more luck transitioning between view controllers rather than between views. It sounds to me like `UINavigationController is a good fit for this use case.
- Joe Osborn
Now since my app is using absolutely no UINavigationControllers whatsoever, is there any easy tutorial converting it from plain UIViewControllers to UINavigationControllers while hiding the Navigationbar and toolbar?
- SimplyKiwi
1 Answers
2
votes
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:
Edit 1:
Uploaded the project now here: http://www.2shared.com/file/qU-QT8fl/Project.html Read the ReadMe.text file. :P