diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2015-07-05 01:35:04 -0700 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2015-07-05 01:35:04 -0700 |
commit | ec93fba84a7ad8440db79e1567dbffd350d5387f (patch) | |
tree | 906dc1aaafa1af6a91351b83d65662e4c705585b | |
parent | d8af7319b49c63f9ff5049abe2fe73cac22e45fc (diff) | |
download | qtlocation-mapboxgl-ec93fba84a7ad8440db79e1567dbffd350d5387f.tar.gz |
Fixed crash on launch on iOS 7
In #1793, I conflated the compass container’s constraints to its parent view with the compass container’s content size constraints, but only in the iOS 7 code path. The result was a crash on launch due to an unprepared view hierarchy.
Fixes #1818.
-rw-r--r-- | platform/ios/MGLMapView.mm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/platform/ios/MGLMapView.mm b/platform/ios/MGLMapView.mm index 06a2ef36be..cd6ab6ad9f 100644 --- a/platform/ios/MGLMapView.mm +++ b/platform/ios/MGLMapView.mm @@ -539,7 +539,7 @@ std::chrono::steady_clock::duration secondsAsDuration(float duration) multiplier:1 constant:5]]; - [compassContainerConstraints addObject: + [compassContainer addConstraint: [NSLayoutConstraint constraintWithItem:compassContainer attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual @@ -548,7 +548,7 @@ std::chrono::steady_clock::duration secondsAsDuration(float duration) multiplier:1 constant:self.compassView.image.size.width]]; - [compassContainerConstraints addObject: + [compassContainer addConstraint: [NSLayoutConstraint constraintWithItem:compassContainer attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual @@ -562,7 +562,7 @@ std::chrono::steady_clock::duration secondsAsDuration(float duration) } else { - [compassContainer addConstraints:compassContainerConstraints]; + [constraintParentView addConstraints:compassContainerConstraints]; } // logo bug |