1
我是MonoTouch
的新手,因此MonoTouch.Dialog
。使用Elements API,我创建了一个带有两个按钮“帐户”和“联系人”的简单视图。使用MonoTouch.Dialog搜索视图
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
?
谢谢。
完美,谢谢。 – dewed 2012-02-15 22:53:58