Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

shamanskyh

macrumors member
Original poster
Jan 16, 2009
43
0
Hello all. I am in the process of creating my first iPhone Application and I could use some help. I'm a beginner, so don't assume I know anything! :)

I'd like to use a button to change windows

I used this tutorial: http://www.servin.com/iphone/iPhone-Buttons.html but I would like to change the window rather than the background color.

- (IBAction) doBlueButton {
window.backgroundColor = [UIColor blueColor];
}

Now instead of "window.backgroundColor = [UIColor blueColor];" I need to change that line so that when the button is clicked, it changes the window.
 
you should really step back and have a look at basic objective c stuff then. especially for this case, you should take a look at how windows, views and the view hierarchy work.

anyway, what you need to do is remove the current view from the window and add another subview to the windows that you want to display. it's your job to figure out how to do it, but the documentation of UIView might help you :D
 
You should buy a book on iPhone development and do all the exercises. That's the fastest way to learn.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.