跳转

来源:互联网 发布:戏曲伴奏软件 编辑:程序博客网 时间:2024/05/17 04:46

code

按Button进行模态跳转

// 在当前m中引入目标页面h文件

- (void) click: (UIButton *) button{    // 模态跳转    // 1、创建目标页面的对象    SecondViewController *secVC = [[SecondViewController alloc] init];    // 2、设置跳转的动画样式    secVC.modalTransitionStyle = UIModalTransitionStylePartialCurl;    // 3、向目标页面进行跳转    [self presentViewController:secVC animated:YES completion:nil];    [secVC release];}

按Button跳转回之前的页面

- (void) click:(UIButton *) button{    [self dismissViewControllerAnimated:YES completion:nil];}
0 0
原创粉丝点击