iPhone SDK: Advancing from one view to another using a button tap
cocoa-touch, iphone
Solution
One way you could do this is to create a new UIView and then when the button is pressed add that new UIVIew as a subview, therefore making it what you see.
If you make the new view its own subclass of UIView you would do something like this.
LoginView *login = [[LoginView alloc] initWithFrame: rect];
[mainView addSubview: login];
Problem
I want to make a really simple iphone app: one screen with a single button... when the button is tapped a new screen appears. That's it. No animations, nothing, I've tried endlessly to make the NavBar sample project do this... and it works but only if I use a UINavigationController with a table that I can tap etc. I've tried all the skeleton projects in XCode too. I thought I was done when I did this: ``` [[self navigationController] presentModalViewController:myViewController animated:YES]; ``` But I couldn't do it without the UINavigationController. I just want a simple example. Thanks so much!