I wonder if anyone know how you move the legal sign on a mapview, right now my toolbar is covering it. Does anyone know how? There is lot's of help with the google logo but nothing on the apple maps.
You can change the position of those by setting the layoutMargins
of the mapView
.
For example this will push it off from the bottom:
mapView.layoutMargins.bottom = -100
Also you can change edge insets you need all at once:
mapView.layoutMargins = UIEdgeInsets(top: 0, left: 0, bottom: -100, right: 0)
In Swift:
mapView.layoutMargins = UIEdgeInsetsMake(top, right, -20, left)
I tested this in OS9 and it works.
Swift 5.2
// -20 will make the legal disclaimer move down. If you want the
// disclaimer to move up, use a positive number.
mapView.layoutMargins = UIEdgeInsets(top: 0, left: 0, bottom: -20, right: 0)
This should work, although I'm not sure whether Apple will allow you to do that
UILabel *attributionLabel = [mapView.subviews objectAtIndex:1];
attributionLabel.center = CGPointMake(attributionLabel.center.x, attributionLabel.center.y - 44.0f);
This is still possible in iOS 7, but only (?) if placed in viewDidAppear
.
The coords are reset if placed in viewDidLoad
or viewWillAppear
.
UILabel *attributionLabel = [mapView.subviews objectAtIndex:1];
attributionLabel.center = CGPointMake(attributionLabel.center.x, attributionLabel.center.y - 44.0f);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With