当我通过单击登录按钮从一个 Storyboard移动到另一个 Storyboard时,this.NavigationController 显示为空。所以我无法 PushViewController。
我有一个带有两个 View 的 Storyboard,并且这两个 View 有单独的 UIViewController。
最佳答案
您必须显式创建一个 UINavigationController 并将您的初始 View Controller 放入其中。这样做会自动设置该导航 Controller 中包含的任何 View Controller 的 NavigationController 属性。
// create the view controller for your initial view - using storyboard, code, etc
var first = new UIViewController(...);
// wrap your VC inside a Nav controller
var nav = new UINavigationController(first);
关于ios - this.NavigationController 为空(xamarin ios stoaryboard),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32120292/