Reputation: 674
I'm wondering how do I move Mapbox's logo and the info button up a little on the map view. But anything I do doesn't seem to affect the map
--my first attempt to solve the problem
let mapboxLogo = mapView.logoView
mapView.logoView.isHidden = true
let logoLeftConstraint = NSLayoutConstraint(item: mapboxLogo, attribute: NSLayoutAttribute.leading, relatedBy: .equal, toItem: mapView, attribute: NSLayoutAttribute.leading, multiplier: 1.0, constant: 8)
let logoBottomConstraint = NSLayoutConstraint(item: mapboxLogo, attribute: NSLayoutAttribute.bottom, relatedBy: .equal, toItem: mapView, attribute: NSLayoutAttribute.bottom, multiplier: 1.0, constant: 32)
mapboxLogo.translatesAutoresizingMaskIntoConstraints = false
mapView.addConstraints([logoLeftConstraint, logoBottomConstraint])
mapView.addSubview(mapboxLogo)
Upvotes: 1
Views: 1358
Reputation: 976
If you are on Mapbox Maps SDK for iOS v3.7.0, you should be able to do this by a couple of ways:
You can find more suggestions and sample code here.
Upvotes: 1