如何让UIView中的Button点击之后跳转到另一个ViewController上去,ViewController上也有一个按钮 可以返回

第一种方法:如果使用导航
第一个按钮方法:
[self.navigationController pushViewController:secondVC animated:YES];
第二个按钮方法:
[self.navigationController popViewControllerAnimated:YES];

第二种方法:如果使用模态
第一个按钮方法:
[self presentViewController:secondVC animated:YES completion:nil];
第二个按钮方法:
[self dismissViewControllerAnimated:YES completion:nil];

原文地址:https://www.cnblogs.com/2015-adong/p/5437017.html