Ios 弹出式导航子视图控制器可以';是否在主控制器上执行segue?
詹姆斯·克兰西在monotouch上使用弹出式导航。无法让子视图控制器在主包含控制器上优雅地执行序列Ios 弹出式导航子视图控制器可以';是否在主控制器上执行segue?,ios,xamarin.ios,segue,xamarin,Ios,Xamarin.ios,Segue,Xamarin,詹姆斯·克兰西在monotouch上使用弹出式导航。无法让子视图控制器在主包含控制器上优雅地执行序列 NavigationRoot = new RootElement ("Navigation") { new Section ("Menu") { new StringElement ("Mapview Controller"), new StringElement ("Another View
NavigationRoot = new RootElement ("Navigation") {
new Section ("Menu") {
new StringElement ("Mapview Controller"),
new StringElement ("Another View Controller"),
}
},
ViewControllers = new [] {
// mapview is a view inside this viewcontroller and able to perform segues
new UIViewController { View = mapView },
// this is a seperate viewcontroller but is embedded inside the flyoutNavigation
// AnotherViewController cant seem to call the root navigation controller (<-- actually a uiNav inside a tab bar nav) so i can perform a segue movement just like the above mapViewController??
this.Storyboard.InstantiateViewController("AnotherViewController") as AnotherViewController,
},
// sub viewcontroller i.e. AnotherViewController trying to move mainViewController to perform a segue..
// throws error: Receiver (<FlyoutNavigation.FlyoutNavigationController: 0x14360600>) has no segue with identifier 'segueTest'
this.ParentViewController.PerformSegue("segueTest", this);
我该怎么办?您可以使用导航来实现这一点
ViewControllers = new [] {
new UINavigationController (this.Storyboard.InstantiateViewController("profileViewController") as ProfileViewController),
}
如何在AppDelegate类中获取情节提要实例?我遇到了一个类似的问题,我使用FlyoutNavigationController作为根,因此需要在AppDelegate中实例化控制器,并且它们正在使用故事板
ViewControllers = new [] {
new UINavigationController (this.Storyboard.InstantiateViewController("profileViewController") as ProfileViewController),
}