FlyoutNavigation
FlyoutNavigation copied to clipboard
Frame sizes inconsistent
Window.RootViewController = new MainController ();
Inside MainController is the FlyoutNavigationController as well as the InboxViewController being added as a view.
// Adding the Inbox to the menu. controllers.Add (new UINavigationController (new InboxViewController())); navigation.ViewControllers = controllers.ToArray ();
// In InboxViewController public override void ViewWillAppear (bool animated) { base.ViewWillAppear (animated); UIToolbar toolbar = new UIToolbar (new RectangleF (0, View.Frame.Size.Height - 44, View.Frame.Size.Width, 44)); this.tableView.AutoresizingMask = UIViewAutoresizing.FlexibleHeight; toolbar.AutoresizingMask = UIViewAutoresizing.FlexibleTopMargin | UIViewAutoresizing.FlexibleWidth; UIBarButtonItem doneBtn = new UIBarButtonItem(UIBarButtonSystemItem.Compose, OnComposeClicked); toolbar.Items = new UIBarButtonItem[] { new UIBarButtonItem(UIBarButtonSystemItem.FlexibleSpace), doneBtn, new UIBarButtonItem(UIBarButtonSystemItem.FlexibleSpace) }; View.Add (toolbar); }
Doing it this way, the toolbar will not show up properly at the bottom of the screen (overlayed over the tableview).
If doing it regularly. Window.RootViewController = new UINavigationController (new InboxViewController ());
Toolbar shows up at the bottom of the screen like normal.
Are you still having this issue? Either way, you should not be adding a toolbar on viewwillappear.