So, I’m building an iOS4 app that has a login screen and has to switch to a different screen after that.
I implemented the login screen in its own view controller and the other screen also has its own view controller. How would I go about switching screens while still preserving the data I need from the Login Screen?
I’ve looked at the View Controller Programming guide on the apple developer website, but I can’t quite seem to grasp what I need.
There are several ways to switch views. Navigation controller as suggested by Eugene is one way. To Preserving data, you can use instant variables or private variables. There is an excellent iOS development tutorial on this site.
Added example of instant variables:
Interface header .h file
Implementation .m file