问题描述
我开始使用 xamarin 来创建 ios 软件.在 mainstoryboard 中,我将 PageMain 视图控制器导航到 PageTo 视图控制器.我想从 PageMain 视图控制器导航到 PageTo 视图控制器.我使用此代码并没有自动导航:
i start using xamarin to create ios software.in mainstoryboard, i navigate PageMain view controller to PageTo view controller.I want navigate from PageMain view controller to PageTo view controller. i use this code and did not auto navigate:
var storyBoard = UIStoryboard.FromName ("MainStoryboard", null);
storyBoard.InstantiateViewController ("PageTo");
也尝试过这个,但也没有自动导航:
tried this one too but also not auto navigate :
PageMainViewController *viewController = segue. PageToViewController;
viewController.delegate = self;
也尝试过这个,但也没有自动导航:
tried this one too but also not auto navigate :
UIViewController pageto = new PageTo ();
pageto.Transition (PageMain, PageTo);
我知道,使用按钮创建 PageTo 视图控制器的推送序列更容易,但我不想要它.请帮帮我.
i know it, it easier use button to create push seque to PageTo view controller, but i did not want it.please help me.
推荐答案
你可以做的另一件事是推送到另一个视图控制器...
Another thing that you can do is push to another view controller...
AssignCaseController assignCaseController = this.Storyboard.InstantiateViewController("AssignCaseController") as AssignCaseController;
if (assignCaseController != null)
{
assignCaseController.CaseID = GetCurrentCaseID();
this.NavigationController.PushViewController(assignCaseController, true);
}
这篇关于Xamarin IOS 在 xamarin 上没有按钮的情况下导航到另一个视图控制器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!