Dklionsk/posterboard — pull request #1 by Dklionsk (2014-12-31 17:53:06+00:00)
Title: Watchlist

One thing the app was missing was an example of a button. Buttons and the target-action pattern are useful things to teach, so I added an "Add to Watchlist" button to at the bottom of the MovieDetailVC. Clicking this button adds or removes the current movie from the user's watchlist. The watchlist is managed by an instance of WatchlistClient.

My comments:
* The watchlist doesn't need to be super fancy so I'm just persisting it to NSUserDefaults.
* Design-wise, if this were a real app, I would have put the add button in the navigation bar, but I wanted to teach how to add and configure buttons in IB.
* I switched the private client properties to being non-optional let properties and define them in custom initializers. I think this is a better pattern than keeping them as optionals.
* I'm doing if let movie = movie in a few places now. It's safe, but might be the wrong pattern for this.