Skip to content

Instantly share code, notes, and snippets.

@hskang9
Created May 29, 2017 11:37
Show Gist options
  • Save hskang9/fb5bf515bb856200ab5574e0603e1963 to your computer and use it in GitHub Desktop.
Save hskang9/fb5bf515bb856200ab5574e0603e1963 to your computer and use it in GitHub Desktop.
Set MKMapview as mainview
import UIKit
import MapKit
class MapViewController: ViewController, MKMapViewDelegate {
var mapView: MKMapView!
override func loadView() {
// Create a MapView
mapView = MKMapView()
// set it as *the* view of this view controller
view = mapView
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment