Chap5: Loading and Appearing Views


#1

The text in the chapter instructs me to add print() functions in ConversionViewController.swift and MapViewController.swift to let me see in the console when the views are loaded the first time.

override function viewDidLoad() {
super.viewDidLoad()

print("ConversionViewController loaded its view")


}

and

override function viewDidLoad() {
super.viewDidLoad()

print(“MapVieController loaded its view.”)

}

After starting the simulator, the console will print “ConversionViewController loaded its view” but clicking the button to show the Map View doesn’t show any results in the console.

There are no error messages or warnings in the .swift view.

If I change the view so that the Map View is first loaded, there still is no printout to the console when the Map View is loaded. Clicking the Conversion button to show the Conversion View does trigger the print() message in the console.

If I drop break points to the print() for each View Controller, the only break point that is triggered is on the ConversionViewController either when the Conversion view is default loaded first or when pushing the Conversion button in the simulator when it is not loaded first.

Any ideas?