iOS DeveloperiOS 开发

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

2016-08-11  本文已影响366人  iOS_Alex

如果使用导航

第一个按钮方法:

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

第二个按钮方法:

[self.navigationController popViewControllerAnimated:YES];

如果使用模态

第一个按钮方法:

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

第二个按钮方法:

[self dismissViewControllerAnimated:YES completion:nil];

上一篇下一篇

猜你喜欢

热点阅读