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