Toolbar below Tabs on IPhone X IOS 11.1?

Hi--

I have a tab bar to navigate my app; each page I use auto layout on them. I have a couple pages which have a Toolbar to help inner navigations, which are autolayouted to be pinned to the bottom of the page. On all IOS devices I've played with so far, the toolbar is sitting nicely at the top of the tabs -- however, on the iPhone X emulator, I see the toolbar about 5px and the rest of it is under the toolbar.

The designer view:

vs the emulator:

Any thoughts on working around this? Or is it just an emulator issue? Thanks!

Eric

Best Answer

Answers

  • TedRogersTedRogers USMember ✭✭✭✭
    edited November 2017

    I assume you are using UITabBarController. Is your tabbar set to translucent?

    TabBar.Translucent = false;

    If you have a sample project, I'll take a quick look.

  • EricTheriaultEricTheriault USMember ✭✭

    Hi--

    To be clear, the layout depicted in the picture only occurs on the IPhone X -- on every other device and emulator I've tried, it looks just like the XCode preview. I'll take a look at the Translucent property to see how usable that is but I suspect it wont be ideal. Thanks.

    Eric

  • TedRogersTedRogers USMember ✭✭✭✭
    If set to false it should make sure your view controller view doesn’t go under the tab controller tab bar.
  • EricTheriaultEricTheriault USMember ✭✭

    Hi--

    I wouldn't have expected that :) -- but unfortunately, that didn't change anything for me. Basically instead of the gray colour for the toolbar, it is now a white in the same position. Thanks for the suggestion though.

    Eric

  • TedRogersTedRogers USMember ✭✭✭✭

    Can you whip together a sample that illustrates the issue?

  • EricTheriaultEricTheriault USMember ✭✭

    Hi--

    Sure, here is a sample: https://bitbucket.org/etheriau/xamarinstoryboardtest that reproduces the issue. In doing that sample, I think one answer to avoid this is to not use a custom Toolbar, however, it is still strange that auto-layout works the way it did. Let me know if you have any insight. Thanks.

    Eric

  • TedRogersTedRogers USMember ✭✭✭✭

    @EricTheriault Needing a distraction I whipped together a sample app that seems to work correctly.

  • TedRogersTedRogers USMember ✭✭✭✭

    I don't see any constraints on your toolbar.

  • EricTheriaultEricTheriault USMember ✭✭

    Hi--

    I'm using auto layout which I thought was not compatible with constraints?

    Eric

  • EricTheriaultEricTheriault USMember ✭✭

    Hi--

    Thanks for the clarification -- I didn't realize that Auto Resize was a different beast all together. I will take a look into this. Thanks so much!

    Eric

  • TedRogersTedRogers USMember ✭✭✭✭

    Yea, auto resizing masks is old tech. You should stick with auto layout so you can do things like constraint to top and bottom layout guides which is what fixes your problem.

Sign In or Register to comment.