Clancey / FlyoutNavigation

Other
95 stars 87 forks source link

Frame sizes inconsistent #49

Open jojojames opened 10 years ago

jojojames commented 10 years ago

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.

Clancey commented 9 years ago

Are you still having this issue? Either way, you should not be adding a toolbar on viewwillappear.