Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/102.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 弹出式导航子视图控制器可以';是否在主控制器上执行segue?_Ios_Xamarin.ios_Segue_Xamarin - Fatal编程技术网

Ios 弹出式导航子视图控制器可以';是否在主控制器上执行segue?

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

詹姆斯·克兰西在monotouch上使用弹出式导航。无法让子视图控制器在主包含控制器上优雅地执行序列

        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),
}