Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frame sizes inconsistent #49

Open
jojojames opened this issue Mar 17, 2014 · 1 comment
Open

Frame sizes inconsistent #49

jojojames opened this issue Mar 17, 2014 · 1 comment

Comments

@jojojames
Copy link

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
Copy link
Owner

Clancey commented Dec 17, 2014

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants