Tutorial details

Switching Views | App Code for Sale | Preview

Switching Views | iOS Tutorial

How to switch from one view to another in your project

Overview PAGE TOP

Reference: http://www.geekylemon.com/WEBPROTECT-xcodeswitchingviews.htm

In this tutorial i will be showing you how to switch from one view to another in your project

Features:

  • 1 round rect button
  • A second view

Having multiple views is almost an essential with most apps making them more explorable and displaying more content rather than being restricted to one view, switching views is simple just by pressing the round rect button a transition animation plays as the second view appears

ViewController.h PAGE TOP

@interface ViewController :UIViewController {
}
- (IBAction)SwitchView:(id)sender;
@end

ViewController.m PAGE TOP

#import "SecondView.h"
@implementation ViewController
- (IBAction)SwitchView:(id)sender {
SecondView *second = [[SecondView alloc] initWithNibName:nil bundle:nil];
[self presentViewController:second animated:YES completion:NULL];
}
@end

SecondView.h PAGE TOP

@interface SecondView :UIViewController {
}
- (IBAction)Back:(id)sender;
@end

SecondView.m PAGE TOP

@implementation SecondView
- (IBAction)Back:(id)sender {
[self dismissViewControllerAnimated:YES completion:NULL];
}
@end

Reference PAGE TOP

http://www.geekylemon.com/WEBPROTECT-xcodeswitchingviews.htm

0 Comments Leave a comment

Please login in order to leave a comment.

Newest first
!

Sign-in to your Chupamobile Account.

The Easiest way to Launch your next App or Game.

Join Chupamobile and get instant access to thousands of ready made App and Game Templates.

Creating an account means you’re okay with Chupamobile’s Terms of Service and Privacy Policy.