Easiest way to switch views! - iPhone SDK Xcode Tutorial

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
9,595
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jun 3, 2010

The easiest possible way to switch views in the iPhone SDK. About 2 lines of code for 1 button to switch views!

Follow me on Twitter,
http://www.twitter.com/AppleHack23/

Visit my website,
http://www.applehack23.com/

Rate, Comment, Subscribe!!!!

Category:

Howto & Style

Tags:

License:

Standard YouTube License

  • likes, 1 dislikes

Link to this comment:

Share to:

Uploader Comments (AppleHack23)

  • I found this an superb tutorial on how to make multiple views quickly but I have come across a problem worthy of another tutorial which know one seems to cover. If you build a project that has say 10 views and you navigate to say view 6 and you want to go back to view 5 how would you do this?

    I have tried for hours (newbie) to get this to work taking reference from the way view2 goes back to view one but I don't seem to be able to replicate it on other views.

    Any help??

    Regards

  • @FrankFlaps

    In your IBAction for your switch to view 5 button, you would do this:

    [view6 setHidden:YES];

    [view5 setHidden:NO];

    and if you wanted to make sure all the views were hidden except 5, just to make sure, you would just do [view/*(Number)*/ setHidden:YES]; for each view.

  • im not getting the "Received Actions" at 3:03.

  • @331319 Click on your Xcode window and press command + b at the same time on your keyboard. Then click save all. Now try.

  • your an idiot this is not the easiest way to do it its alot more than 2 lines of code and it wont work with alot of people because alot of peolpe wont have the apdelegate because they arent doing this on their main view

  • @madmax18765 Do you listen at all? I said you can do this is any .m.

see all

All Comments (49)

Sign In or Sign Up now to post a comment!
  • It's easy but bad style.

  • Easiest tutorial on this I have seen. Thanks!

  • If this helps you need 2 buttons on each view one forward one back..

  • im using xcode 4 and it crashes every time i try to press the switch button. help!

  • ive tried doing this inside a tap bar app and the app always crashes when i klick on he button!

  • WOW!! That was great, it also works for view based apps too, this is great thanks for the tutorial!! BIG HELP

  • can u use the "setHidden" on views instead of windows?

  • Thanx mate!!

  • easier way>>>>>>>> youtube . com/user/ipodtouchacker

  • When i Build and Run it goes to my second view, and i cant click on the button that i made. Whats happening?!

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more