Swift MkMapView에서 지도 앱을 만들려고 했습니다. (01) - 지도 보기
기사 목록
Swift MkMapView에서 지도 앱을 만들어 보았습니다 (기사 목록)
환경
프로젝트 만들기
Xcode를 시작하고 Create a new Xcode project를 누릅니다.

Single View App을 선택하고 Next를 누릅니다.

제품 이름에 앱 이름을 입력합니다.
다음을 누르면 (4.) 이미지에있는 일반 설정 화면이 표시됩니다.

Display Name, Deployment Target, Device를 설정합니다.

MkMapView에서 지도 보기
storyboard에 표시되는 장치를 설정해 둡니다.


storyboard에 MkMapView를 붙여 넣습니다.
「command+shift+l(엘)」을 누르면 Object를 선택하는 Window가 표시된다.
Map Kit View를 storyboard의 기기로 드래그하여 드롭합니다.

붙여넣은 MkMapView를 화면 가득 늘립니다.

ViewController.swift에 MkMapView 변수를 정의합니다.
MkMapView의 변수 정의
import UIKit
import MapKit
class ViewController: UIViewController {
@IBOutlet var mapView: MKMapView!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
}
mapView 변수에 MkMapView를 연결합니다.
Map View에서 마우스 오른쪽 버튼을 클릭하고 Referencing Outlets의 ○를 View Controller로 드래그하여 드롭합니다.

연결할 변수를 선택합니다.

▶︎를 눌러 PC 시뮬레이터를 시작합니다.

기사 목록
Swift MkMapView에서 지도 앱을 만들어 보았습니다 (기사 목록)
Reference
이 문제에 관하여(Swift MkMapView에서 지도 앱을 만들려고 했습니다. (01) - 지도 보기), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/yuta-sasaki/items/797c74c64f57b36ddf29
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
Reference
이 문제에 관하여(Swift MkMapView에서 지도 앱을 만들려고 했습니다. (01) - 지도 보기), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/yuta-sasaki/items/797c74c64f57b36ddf29텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)