1
我在分割視圖上使用導航欄時出現問題。我想在左側視圖中顯示我的TableView的導航欄(請參見圖片Click Here)。 這是我的AppDelegate:無法在SplitView上顯示NavigationBar MonoTouch
public override bool FinishedLaunching (UIApplication app, NSDictionary options)
{
// create a new window instance based on the screen size
window = new UIWindow (UIScreen.MainScreen.Bounds);
this.masterViewController = new MasterViewControl();
this.detailViewController = new DetailViewController();
this.splitController = new UISplitViewController();
this.splitController.ViewControllers = new UIViewController[] {
this.masterViewController,
this.detailViewController
};
this.splitController.Delegate = new SplitControllerDelegate(this.detailViewController);
window.RootViewController = this.splitController;
// make the window visible
window.MakeKeyAndVisible();
return true;
}
而且MasterViewController IM試圖用這種方式
'this.buttonAdd = new UIBarButtonItem("Edit", UIBarButtonItemStyle.Bordered, this.ButtonAdd_Clicked);
this.NavigationItem.SetRightBarButtonItem (this.buttonAdd, true);'