Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- String()
- Segue
- reduce()
- alamofire
- 프로그래머스
- suffix()
- API
- Info.plist
- xib
- uisearchbar
- joined()
- 코딩테스트
- tableView
- replacesubrange()
- 싱글톤
- Autolayout
- IOS
- 클론코딩
- swift
- GIT
- 알고리즘
- 라이징캠프
- components()
- 코드업 파이썬 기초 100제
- MVC
- prefix()
- github
- 대문자소문자
- zip()
- uikit
Archives
- Today
- Total
Daeng iOS
[IOS/UIKit] KaKao Maps API 현위치 트래킹 본문
지도에 현재 내 위치를 띄우기 위한 방법이다
1) info.plist를 수정

Privacy - Location When In Use Usage Description : 앱이 사용중일 때만 가져오기
Privacy - Location Always and When In Use Usage Description : 앱을 사용안해도 항상 가져오기
2) 소스 코드
//지도 불러오기
mapView = MTMapView(frame: self.subView.bounds)
if let mapView = mapView {
//델리게이트 연결
mapView.delegate = self
//지도 타입 설정
mapView.baseMapType = .standard
//현재 위치 트래킹
mapView.currentLocationTrackingMode = .onWithoutHeading
mapView.showCurrentLocationMarker = true
self.view.addSubview(self.subView)
subView.addSubview(mapView)
}
'IOS > UIKit' 카테고리의 다른 글
[iOS/UIKit] url 로 image 지정하기 (0) | 2022.10.24 |
---|---|
[iOS/UIKit] 네이버 검색 API 연동 (영화) (0) | 2022.10.24 |
[iOS/UIKit] searchBar 사용 (+테두리 없애기) (0) | 2022.10.23 |
[iOS/UIKit] UIView 테두리 추가 (전체, 특정부분) (0) | 2022.10.23 |
[IOS/UIKit] Kakao Maps API 연동하기 (0) | 2022.08.04 |