我正在尝试使用Xamarin以编程方式设置用户界面。(c#(。如何嵌入导航控制器、选项卡栏控制器和页面控制器?提前谢谢。
您可以将其放置在AppDelegate的FinishedLaunching 中
var tab = new UITabBarController ();
var nav1 = new UINavigationController (new MyViewController1 ());
var nav2 = new UINavigationController (new MyViewController2 ());
var nav3 = new UINavigationController (new MyViewController3 ());
tab.ChildViewControllers = new [] { nav1, nav2, nav3 };
Window.RootViewController = tab;