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);'