首页 > 代码库 > iOS 按钮跳转页面

iOS 按钮跳转页面

ViewController.h中定义按钮 btn1;



@property (weak, nonatomic) IBOutletUIButton *btn1;



ViewController.m中实现按下按钮跳转到:qqqViewController;



- (IBAction)btn1:(id)sender

{

    qqqViewController *qqqv = [[qqqViewControlleralloc] init];

    [selfpresentModalViewController:qqqv animated:NO];


    NSLog(@"23123");

}



qqqViewController.m 中添加按钮btnback 实现跳转回ViewController


- (IBAction)btnback:(id)sender {

    [selfdismissModalViewControllerAnimated:YES];

}




iOS 按钮跳转页面