Added: 1 year ago
From: AppleHack23
Views: 9,509
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

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?!

  • Can you do this without a delegate.. I just have the viewController (.h and .m) with it's xib file. But I don't know if this will work because View Controllers don't have windows, just a view.

    Thanks

  • IF you want to make 4 views how do you fix it? first to second to third to fourth?

  • Hi there, Great tutorial thanks,!

    I am trying to make a soundboard, with a switch view, and I am able to make a switch view app, and a soundboard app, however I am having problems combining the two... can you help? please!!!?

    Steve

  • I have realised it open the app on random pages. How do I get it to open on view 6?

  • In mine I have 6 views, but when I open (build and go) the simulator opens but the app thAt loads it just. White screen, how do I get it to show what I have done in the interface builder?

  • Comment removed

  • Hi appleHack, I am a subscriber and really liked this tutorial. I am new at this, so maybe this is a stupid question, but how do you write the .h and .m files for the new views? Just make a new class file? For example if I wanted to play a sound clip or video clip on view 2, how is that done? i looked for other tutorials on this, but i think you are the only one that has broken the views down like this...brilliant by the way! I have been at this for weeks, and finally a tutorial that I get!

  • Comment removed

  • how do u do this doing a viewbased application?

  • Comment removed

  • Comment removed

  • can you post a tutorial on UIPageControl pls.

    ( Can i switch views using page control... )

  • Thank You very much

    you save the day.

    YOU ROCK bro....

  • Thank You SO much!!!!!

    I had been looking for hours how to do this (my first day with Xcode) and this was by far the best tutorial

    Thanks again

  • 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.

  • @AppleHack23 Thank you very much, that worked a treat and I understand it now. Thanks for the help, it is greatly appreciated!!!

  • @FrankFlaps all u gots to do is just make an IBAction and make to code go to the 5th page and link it up to the button you would like :)

  • 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.

  • When I try putting this in View, I don't have the app delegate...

  • @SoopleGamer Yes you do. It's your AppNameAppDelegate.h and .m. Or if you're talking about interface builder, then you need to open up your MainView.xib. This doesn't have to be done in the AppDelegate, it can be done in the ViewController.

  • @AppleHack23 Ok. I found AppDelegate and put it in the APPNAMEViewController.xib and everything hooked up right. It loaded fine and when I click on the button, it crashes and returns to the home menu. I'll deploy this to my phone and see if it's just the simulator. Also I changed UIWindow to UIView since I have to have View application since I need it in landscape.

  • @SoopleGamer Didn't work... I'll see what caused the crash. I'll try and put it in viewcontroller.h and .m

  • @SoopleGamer Transfered the files to the viewcontroller.h and .m. I load it and it goes to a blank view. I added the -(void)viewDidLoad in viewcontroller.m and it still does that.

  • can you please make more videos please?

  • Can you set animation/transitions when you are switching?? And would it be possible for you to post the source code? (maybe on your site)???

  • quick question...

    I got the view to work but when i run the simulator it doesn't open with the main window. Is there a way to choose which window opens first?

  • @Lancewise Open Interface Builder, click on your Window in your document, in the first tab of the Inspector, check of, "Visible at launch". If that doesn't work just comment again, and I'll have another answer.

  • Comment removed

  • @AppleHack23 well it worked at first but now its doing it again. Simulator wont open with the right window even after I checked the visible at launch box. It seems to open the last window made each time if that helps at all. Thank you again for you help and you tutorial was very to the point and easy to follow btw.

  • @Lancewise In your .m, find a new space, and type the following.

    -(void)viewDidLoad { [windowName setHidden:YES]; */do that for every window except the one you want to see at launch. Replace windowName with the name of your window./*

    }

  • Does this work with a view based?

  • how did you get the iphoe screen on the demo god thing without jailbreaking or did you jailbreak

  • @legoyokid1 Thats the iPhone simulator.

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