Code from our book Swift Development with Cocoa (1st Edition), for O'Reilly Media.