Using an info button to switch windows

Discussion in 'iOS Programming' started by shamanskyh, Jul 16, 2009.

  1. shamanskyh macrumors member

    Jan 16, 2009
    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: 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.
  2. BlackWolf macrumors regular

    Apr 9, 2009
    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
  3. PhoneyDeveloper macrumors 68040


    Sep 2, 2008
    You should buy a book on iPhone development and do all the exercises. That's the fastest way to learn.

Share This Page