美文网首页iOS DeveloperiOS 开发
如何让UIView中的Button点击之后跳转到另一个ViewC

如何让UIView中的Button点击之后跳转到另一个ViewC

作者: iOS_Alex | 来源:发表于2016-08-11 10:50 被阅读366次

如果使用导航

第一个按钮方法:

[self.navigationController pushViewController:secondVC animated:YES];

第二个按钮方法:

[self.navigationController popViewControllerAnimated:YES];

如果使用模态

第一个按钮方法:

[self presentViewController:secondVC animated:YES completion:nil];

第二个按钮方法:

[self dismissViewControllerAnimated:YES completion:nil];

相关文章

网友评论

    本文标题:如何让UIView中的Button点击之后跳转到另一个ViewC

    本文链接:https://www.haomeiwen.com/subject/sizjsttx.html