LoginSignup
13
9

More than 5 years have passed since last update.

【MKMapView】現在地の青い◎(ドット)の色を変える

Posted at

これは何

MapView で地図を表示すると、現在地が青い丸印で表示されますが、この色を変える方法です。iOS 7以上で有効です。

image

Storyboardで変更する

Tint を好きな色に変更します。User Location にチェックを入れるのも忘れずに。

image

コードで変更する

MKMapViewtintColor に好きな色をセットします。

mapView.showsUserLocation = true
mapView.tintColor = UIColor.greenColor()

実行結果

image

image

image

13
9
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
9