我在情节提要中有两个视图控制器。我确实以编程方式成功地从第一个导航到第二个:
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
YourViewController *yourViewController = (YourViewController *)[storyboard instantiateViewControllerWithIdentifier:@"yourViewControllerID"];
[self.navigationController pushViewController:yourViewController animated:YES];
我想使用我的custom
Segue 导航到其他页面,而不是pushViewController
不使用界面生成器。
这是我可以轻松与界面生成器一起使用的自定义 Segue:
@interface LeftToRightSegue : UIStoryboardSegue
如何以编程方式进行?