티스토리 뷰
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 31 32 33 34 35 | //ViewController import UIKit import MapKit import CoreLocation class ViewController: UIViewController { @IBOutlet weak var maps: MKMapView! override func viewDidLoad() { super.viewDidLoad() // location 값과 span(얼마나 확대할거냐) 지정 var location = CLLocationCoordinate2DMake(48.87146, 2.35500) var span = MKCoordinateSpan(latitudeDelta: 0.02,longitudeDelta: 0.02) var region = MKCoordinateRegion(center: location, span : span) var annotation = MKPointAnnotation() annotation.coordinate = location annotation.title = "My Office" annotation.subtitle = "Check for Alert" maps.setRegion(region, animated: true) maps.addAnnotation(annotation) } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } } | cs |
'[Swift] Notebook' 카테고리의 다른 글
Swift 버튼으로 진동+내장 아이폰 효과음 내기 코드 (0) | 2016.04.18 |
---|---|
Swift - 버튼으로 URL열기 및 전화,문자,메일 열기 (0) | 2016.04.18 |
Swift - View데이터를 다른 View로 넘겨주기 (0) | 2016.04.18 |
[Swift] String 관련 정리 (0) | 2015.05.06 |
[Swift] Python과 비교해서 Dict의 접근을 공부해 봅시다. (0) | 2015.04.27 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- nginx
- Python
- Django
- uWSGI
- app
- s3
- API
- 개발
- Swift
- grib
- IOS
- boto3
- lambda
- lib
- ubuntu
- code review
- CocoaPods
- FTP
- Apple
- 기상청
- OpenAPI
- AWS
- jupyter
- admin
- css
- 파이썬
- project
- pycon
- swift3.0
- serverless
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
31 |
글 보관함