Compass placing or position in a map view post iOS6

前端 未结 3 1913
时光说笑
时光说笑 2020-12-24 02:52

Does anyone know of a way to change the placing of the compass in MKMapview?

I\'m talking about the compass that shows up in the upper right corner of the map when

3条回答
  •  我在风中等你
    2020-12-24 03:11

    Swift:

    mapView.layoutMargins = UIEdgeInsets(top: 20, left: 0, bottom: 20, right: 0)
    

    Where instead of 20 you could calculate your UI elements height to have a more dynamic solution adjusting to each device or element.

提交回复
热议问题