XCode 4 Tutorial Switching views - Geeky Lemon Development
Why Stack Overflow recommends it
Stack Overflow users link it as the beginner tutorial they followed for switching views on button press, and often return with questions or crashes from using its code.
Recommended by 2 people across 2 different months, 2011 to 2013.
What it is
A short 2011 screencast by GeekyLemon showing how to switch from one view to another in an iPhone app using Xcode 4 and Objective-C, by presenting a new UIViewController subclass modally when a button is pressed. Source code is provided on the author's site.
What people said
Recommends Rick · 2011-08 · Stack Overflow · on “Switching views for iphone application - is this the right way?”
After looking for many hours to find a working view switching code, I finally found a great tutorial [this video] on YouTube. It was exactly what I needed as I needed to switch views when buttons are pressed. I just wonder if the techniques used in that video are valid. The used code to switch screens is viewsViewController *second = [[viewsViewController alloc] initWithNibName:nil bundle:nil]; [self presentModalViewController:second animated:YES]; Where viewsViewController (or any class that is used there) is a class that's a subclass of UIViewController. This class is made by clicking File > New File > Add UIViewController subclass. Is this method according to the Apple guidelines? Is this meth
Recommends Hermann Klecker · 2012-07 · Stack Overflow · on “Navigation Controller's Root View Controller”
I mean that I cannot provide any code because I do not have access to good examples. You may find some useful information here where somebody asked a similar question: [LINK] For that one you would need to work in iOS 5.x or higher. This video tutorial might help: [LINK] . This one is even more basic: [this video]
Cites cyberbemon · 2011-08 · Stack Overflow · on “Multiview application crash”
I made a multiview based application. My app has 3 views. The first is a disclaimer notice. When the user agrees it takes them to the main menu. From there, if they click a button, they will be taken to the respective views. One view is where the user can enter values (upon which a calculation is done). When I click the button to go to that view my app crashes and the following code gets highlighted. I followed this video tutorial [this video] . [self presentModalViewController:second animated:YES]; along with the program received a SIGABRT message ! Checking the debugger showed me the following message: Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<gainview 0x6a10
Cites Erv Noel · 2013-10 · Stack Overflow · on “Xcode5 error : Warning attempt to present <View> on <OtherView> while presentation is in progress”
I am still a noob when it comes to making applications for iOS and I don't understand why I am getting a certain error. For my current project I am trying to switch views but I cannot get it to work and I do not really understand why. I followed this tutorial for the button( [this video] ) and although the tutorial is older, it still works. I had to edit some of the code to make sure that it worked for Xcode 5 though. Every time I press the button to switch the views I get an error that reads " Warning: Attempt to present < SecondView: 0xc918d50 > on < SeriouslyFunnyView: 0xc91a130 > while a presentation is in progress!" and the screen in the iPhone Simulator just goes black. I am also using Stor