<分区>
如何在 Swift
语言中将一个 UIViewcontroller
切换到另一个 UIViewController
?我正在创建一个新的空项目并设置 UINavigationcontroller
并且不使用 Storyboard。
例如,我们在 objective-c 中使用这段代码来推送 View Controller
MyViewController *controller = [[MyViewController alloc] initWithNibName:@"MyViewController" bundle:nil];
[self.navigationController pushViewController:controller animated:YES]
Swift 中的替代方案是什么?
任何帮助都将不胜感激 提前致谢。