After following the book, I can’t even create views programmatically with overriding viewLoad().
- deleted Map View on storyboard.
- amended MapViewController with overriding loadView() and setting view = mapView
However when I build and run the application, only Convert tab is showing and Map tab is not showing up at all. Please help, I can’t even follow the book any further without achieving this.
import UIKit
import MapKit
class MapViewController: UIViewController {
var mapView: MKMapView!
override func loadView() {
mapView = MKMapView()
view = mapView
}
override func viewDidLoad() {
super.viewDidLoad()
print("MapViewController loaded its view")
}
}