Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Compass/logo/attribution control views’ constraints are ambiguous on iOS 10 #6260

Closed

Description

@friedbunny

Platform: iOS 10 (beta 8)
Mapbox SDK version: v3.3.0 — v3.4.0-alpha.4

On iOS 10, our UI elements are not respecting content insets:

img_3584

  • The compass can be overlapped by the status bar.
  • Toolbars hide the Mapbox logo and attribution button.

Navigation bar insets continue to work as expected, pushing the compass down.

Xcode’s View Hierarchy debugger flags these views with “Vertical position is ambiguous.”

screen shot 2016-09-06 at 4 34 52 pm

/cc @boundsj @1ec5

Activity

  1. added
    iOS
    on Sep 6, 2016
  2. added this to the ios-v3.4.0 milestone on Sep 6, 2016
  3. friedbunny commented on Sep 6, 2016

    @friedbunny
    ContributorAuthor

    As I dig into this, it may just be a problem with Treble’s storyboard setup, which IB says has a misplaced view:

    screen shot 2016-09-06 at 4 44 17 pm

  4. friedbunny commented on Sep 6, 2016

    @friedbunny
    ContributorAuthor

    Except that fixing the “misplaced view” doesn’t fix the inset problems. (And this view was never 600x600, as IB claims.)

    screen shot 2016-09-06 at 5 02 02 pm

    Making the Mapbox view the base view does solve this problem, however. (Not pictured.)

  5. 1ec5 commented on Sep 6, 2016

    @1ec5
    Contributor

    And this view was never 600x600, as IB claims.

    Perhaps there was an issue migrating the storyboard to the Xcode 8 format, which no longer has a 600×600 default simulated size.

    Making the Mapbox view the base view does solve this problem, however.

    It isn’t recommended to make the MGLMapView the root view unless you intend for it to be the only view in the scene.

    In any case, I’m unable to reproduce the visual issue in Xcode 8.0 beta 6 (8S201h) with a test project that uses an MGLMapView as a direct child of the root view, with zero-point constraints on all sides and top and bottom bars. However, Xcode is reporting runtime Auto Layout warnings regarding the logo view, ℹ️ button, and compass container view, as you reported:

    Layout Issues Group
    x-xcode-debug-views://7ffd35f23cb0: runtime: Layout Issues: Vertical position is ambiguous for UIImageView.
    
    x-xcode-debug-views://7ffd35f23cb0: runtime: Layout Issues: Vertical position is ambiguous for UIButton.
    
    x-xcode-debug-views://7ffd35f23cb0: runtime: Layout Issues: Vertical position is ambiguous for UIView.
    
  6. 1ec5 commented on Oct 7, 2016

    @1ec5
    Contributor

    Duplicate of #5549.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugiOS

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions