diff options
author | Fabian Guerra <fabian.guerra@mapbox.com> | 2018-01-10 11:23:42 -0600 |
---|---|---|
committer | Fabian Guerra <fabian.guerra@mapbox.com> | 2018-01-10 11:43:47 -0600 |
commit | 57faf8c399ee15f0567af7bb26e9aa24dc7c4166 (patch) | |
tree | 899221abccd961433ffa76827dffe0ed74a39f7b | |
parent | 6ac53991e6d06b90e2aa7b0e8c4ce3ec67b788f0 (diff) | |
download | qtlocation-mapboxgl-upstream/fabian-map-insets-10834.tar.gz |
[ios] Remove NSLogs from MGLMapViewLayoutTestsupstream/fabian-map-insets-10834
-rw-r--r-- | platform/ios/src/MGLMapView.mm | 2 | ||||
-rw-r--r-- | platform/ios/test/MGLMapViewLayoutTests.m | 13 |
2 files changed, 1 insertions, 14 deletions
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index 579dac3a38..4f4a18865e 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -908,7 +908,6 @@ public: // logo view [self removeConstraints:self.logoViewConstraints]; [self.logoViewConstraints removeAllObjects]; -// [NSLayoutConstraint activateConstraints:@[[self constraintForYAxisAnchor:safeAreaLayoutGuide.bottomAnchor belowAnchor:self.logoView.bottomAnchor]]]; [self.logoViewConstraints addObject:[self constraintForYAxisAnchor:safeAreaLayoutGuide.bottomAnchor belowAnchor:self.logoView.bottomAnchor]]; [self.logoViewConstraints addObject:[self.logoView.leftAnchor constraintEqualToAnchor:safeAreaLayoutGuide.leftAnchor constant:8.0 + self.contentInset.left]]; @@ -917,7 +916,6 @@ public: // attribution button [self removeConstraints:self.attributionButtonConstraints]; [self.attributionButtonConstraints removeAllObjects]; -// [NSLayoutConstraint activateConstraints:@[[self constraintForYAxisAnchor:safeAreaLayoutGuide.bottomAnchor belowAnchor:self.attributionButton.bottomAnchor]]]; [self.attributionButtonConstraints addObject:[self constraintForYAxisAnchor:safeAreaLayoutGuide.bottomAnchor belowAnchor:self.attributionButton.bottomAnchor]]; [self.attributionButtonConstraints addObject:[safeAreaLayoutGuide.rightAnchor constraintEqualToAnchor:self.attributionButton.rightAnchor constant:8.0 + self.contentInset.right]]; diff --git a/platform/ios/test/MGLMapViewLayoutTests.m b/platform/ios/test/MGLMapViewLayoutTests.m index cde50e480f..a41e7695f9 100644 --- a/platform/ios/test/MGLMapViewLayoutTests.m +++ b/platform/ios/test/MGLMapViewLayoutTests.m @@ -19,7 +19,6 @@ [MGLAccountManager setAccessToken:@"pk.feedcafedeadbeefbadebede"]; NSURL *styleURL = [[NSBundle bundleForClass:[self class]] URLForResource:@"one-liner" withExtension:@"json"]; - NSLog(@"================> Screen size: %@", NSStringFromCGRect(UIScreen.mainScreen.bounds)); self.superView = [[UIView alloc] initWithFrame:UIScreen.mainScreen.bounds]; @@ -45,10 +44,7 @@ //invoke layout [self.superView setNeedsLayout]; [self.superView layoutIfNeeded]; - NSLog(@"================> self.mapView.frame: %@", NSStringFromCGRect(self.mapView.frame)); - if ( [self.mapView respondsToSelector:@selector(safeAreaInsets)] ) { - NSLog(@"================> self.mapView.safeAreaInsets: %@", NSStringFromUIEdgeInsets(self.mapView.safeAreaInsets)); - } + } - (void)mapView:(MGLMapView *)mapView didFinishLoadingStyle:(MGLStyle *)style { @@ -65,8 +61,6 @@ [super tearDown]; } -// TODO: check constraining to superview vs. constraining to safeAreaLayoutGuide.bottomAnchor - - (void)testOrnamentPlacement { CGFloat margin = 8.0; @@ -79,25 +73,21 @@ //compass UIImageView *compassView = self.mapView.compassView; - NSLog(@"================> %@", compassView); CGFloat expectedCompassOriginX = CGRectGetMaxX(self.mapView.bounds) - margin - CGRectGetWidth(compassView.frame); CGFloat expectedCompassOriginY = margin; - // what about width/height? maybe we don't care as much at the moment? XCTAssertEqualWithAccuracy(CGRectGetMinX(compassView.frame), expectedCompassOriginX, accuracy); XCTAssertEqualWithAccuracy(CGRectGetMinY(compassView.frame), expectedCompassOriginY, accuracy); //scale bar UIView *scaleBar = self.mapView.scaleBar; - NSLog(@"================> %@", scaleBar); XCTAssertEqualWithAccuracy(CGRectGetMinX(scaleBar.frame), margin, accuracy); XCTAssertEqualWithAccuracy(CGRectGetMinY(scaleBar.frame), margin, accuracy); //attribution button UIButton *attributionButton = self.mapView.attributionButton; - NSLog(@"================> %@", attributionButton); CGFloat expectedButtonOriginX = CGRectGetMaxX(self.mapView.bounds) - margin - CGRectGetWidth(attributionButton.frame); CGFloat expectedButtonOriginY = CGRectGetMaxY(self.mapView.bounds) - margin - bottomSafeAreaInset - CGRectGetHeight(attributionButton.frame); @@ -107,7 +97,6 @@ //mapbox logo UIImageView *logoView = self.mapView.logoView; - NSLog(@"================> %@", logoView); CGFloat expectedLogoOriginX = margin; CGFloat expectedLogoOriginY = CGRectGetMaxY(self.mapView.bounds) - margin - bottomSafeAreaInset - CGRectGetHeight(logoView.frame); |