【发布时间】:2014-05-02 20:53:43
【问题描述】:
我是 iOS 应用开发、Xamarin/Xcode 和 Monotouch.dialog 的新手。我正在尝试在“更多关于部分和 RootElements:RootElements”(http://docs.xamarin.com/guides/ios/user_interface/monotouch.dialog/) 下的示例,以让自己熟悉 MonoTouch.Dialog 以用于工作的多屏应用程序。 MonoTouch.Dialog 看起来很简单,但我遇到了一个莫名其妙的问题(q2)。
所以这是我的问题/问题:
如何将 MonoTouch.Dialog 创建的页面集成到使用非表格屏幕的多屏幕应用程序中?我是否必须在主 NavigationController 中创建 NavigationController [例如-> (NavigationController) - Home - SomethingElse - (NavigationController) - (Monotouch.Dialog created pages)],如何连接开始页面和 MonoTouch.Dialog 页面?
-
在 Xamarin-iOS 中工作,我已经完成了示例描述的所有内容,观看了许多视频,并阅读了 MonoTouch.dialog 的几个 Xamarin 文档,但是当我单击创建的元素行时(“晚餐”部分下的行) ,它们不会转到行后面的新 RootElement。我究竟做错了什么?我创建了一个新的 DialogViewController 项目,这就是我在 AppDelegate.cs 内的 Xamarin 代码中编辑的所有内容(Xcode 故事板仅包含一个 NavigationController)。
UIWindow _window; UINavigationController _nav; DialogViewController _rootVC; RootElement _rootElement; public override UIWindow Window { get; set; } public override bool FinishedLaunching (UIApplication application, NSDictionary launchOptions) { _window = new UIWindow (UIScreen.MainScreen.Bounds); _rootElement = new RootElement ("Meals") { new Section ("Dinner") { (Element)new RootElement ("Dessert", new RadioGroup ("dessert", 2)) { new Section () { new RadioElement ("Ice Cream", "dessert"), new RadioElement ("Milkshake", "dessert"), new RadioElement ("Chocolate Cake", "dessert") } }, (Element)new RootElement ("Something"){ new Section () { new EntryElement ("Name", "Click to edit", "") } } }// end "Dinner" }; //end "Meals" _rootVC = new DialogViewController (_rootElement); _nav = new UINavigationController (_rootVC); _window.RootViewController = _nav; _window.MakeKeyAndVisible (); return true; } //end FinishedLaunching
【问题讨论】:
标签: ios xcode xamarin monotouch.dialog