April 2015
Intermediate to advanced
556 pages
17h 47m
English
In order to load the course URL in the web view on selection you will need to trigger a call to loadURL(_:) when the table view selection changes.
Knowing what you know of Cocoa, how would you accomplish this? Come up with two or three approaches before reading on.
Got two or three? Here are some that we came up with:
Directly couple the two view controllers by adding a reference from CourseListViewController to WebViewController. Call a method on the WebViewController whenever the selected course changes.
This would be the simplest approach and it would also be effective. But it has a serious disadvantage in the way that it couples the two view controllers directly ...