- (IBAction)GotoView3:(id)sender { ViewController3 *view3 = [[ViewController3 alloc] initWithNibName:nil bundle:nil]; [self presentViewController:view3 animated:NO completion:NULL]; }
// // ViewController2.h // iOS7App // // Created by Weerachai on 3/23/2557 BE. // Copyright (c) 2557 Weerachai. All rights reserved. // #import <UIKit/UIKit.h> @interface ViewController2 : UIViewController - (IBAction)GotoView3:(id)sender; @end
// // ViewController2.m // iOS7App // // Created by Weerachai on 3/23/2557 BE. // Copyright (c) 2557 Weerachai. All rights reserved. // #import "ViewController2.h" #import "ViewController3.h" @interface ViewController2 () @end @implementation ViewController2 - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self) { // Custom initialization } return self; } - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. } - (IBAction)GotoView3:(id)sender { ViewController3 *view3 = [[ViewController3 alloc] initWithNibName:nil bundle:nil]; [self presentViewController:view3 animated:NO completion:NULL]; } @end
ช่วยกันสนับสนุนรักษาเว็บไซต์ความรู้แห่งนี้ไว้ด้วยการสนับสนุน Source Code 2.0 ของทีมงานไทยครีเอท