I have a MKMapView which shows the user location and also a MKUserTrackingBarButtonItem. I added an edge padding with this line:
mapView.setVisibleMapRect(mapView.visibleMapRect, edgePadding: UIEdgeInsetsMake(0.0, 0.0, (self.mapView.bounds.height-88.0)/2, 0.0), animated: true)
I works but the problem is when I tap the tracking button -to center to the user location- the edge padding leaves.
How to make it work all the time ?
Thanks