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

Storyboard view hierarchy can lead to squashed subviews #1779

Closed
friedbunny opened this issue Jun 23, 2015 · 1 comment
Closed

Storyboard view hierarchy can lead to squashed subviews #1779

friedbunny opened this issue Jun 23, 2015 · 1 comment
Assignees
Labels
bug iOS Mapbox Maps SDK for iOS

Comments

@friedbunny
Copy link
Contributor

Setting your storyboard up with the map view at the base level of the hierarchy like this:

screen shot 2015-06-23 at 11 09 24 am

Leads to the attribution button and logo bug being squashed after the initial load — i.e., load the MBGL view controller, switch to a different view controller, come back to MBGL and this happens:

ios simulator screen shot jun 23 2015 11 10 27 am

Work around is to place the map view within another view, remembering to reset to suggested constraints:

screen shot 2015-06-23 at 11 19 34 am

/cc @1ec5

@friedbunny friedbunny added bug iOS Mapbox Maps SDK for iOS labels Jun 23, 2015
@1ec5
Copy link
Contributor

1ec5 commented Jun 26, 2015

The logo (and attribution button) both have intrinsic width and height constraints that are removed whenever the MGLMapView moves to a new superview, as is the case when returning to the tab view containing the MGLMapView. The compass is unaffected because it has a container view whose constraints are removed.

@1ec5 1ec5 self-assigned this Jun 26, 2015
1ec5 added a commit that referenced this issue Jun 26, 2015
Also, on iOS 8.0+, use `+[NSLayoutConstraint activateConstraints:]` and `+deactivateConstraints:` to efficiently prevent redundant constraints from lingering.

Fixes #1779.
@1ec5 1ec5 removed the in progress label Jun 26, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug iOS Mapbox Maps SDK for iOS
Projects
None yet
Development

No branches or pull requests

2 participants