【发布时间】:2012-02-14 20:46:58
【问题描述】:
我是MonoTouch 和MonoTouch.Dialog 的新手。使用 Elements API,我创建了一个包含两个按钮“帐户”和“联系人”的简单视图。
public override bool FinishedLaunching (UIApplication app, NSDictionary options)
{
_window = new UIWindow(UIScreen.MainScreen.Bounds);
_rootElement = new RootElement("Sample")
{
new Section()
{
new StringElement ("Accounts", delegate { ElementTapped(); }),
},
new Section()
{
new StringElement ("Contacts", delegate { ElementTapped(); }),
}
};
_rootVC = new DialogViewController(_rootElement);
_nav = new UINavigationController(_rootVC);
_window.RootViewController = _nav;
_window.MakeKeyAndVisible ();
return true;
}
点击任一按钮后,我想调出一个新视图进行搜索。我知道我必须创建一个新的DialogViewController 并将EnableSearch 设置为true,但是如何从delegate 中将其添加到我的NavigationController?
谢谢。
【问题讨论】:
标签: xamarin.ios monotouch.dialog