您的位置:首页 > 其它

跳转

2016-03-12 21:54 411 查看

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];
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: