Typed notifications using custom extensions

The Swift API contains a lot of notifications sent out by the system like NSManagedObjectContextObjectsDidChange in Core Data or the AppDelegate events like UIApplicationDidBecomeActive. Some of these notifications contain rich data in their user info dictionary. Reading the user info data using typed notifications can clean up your code, especially if you use these notifications … 

 

Protocol extensions and typed arrays

Swift 2.0 introduces protocol extensions, aswel as typed array extensions. This makes it possible to extend an array containing a specific type or even add methods to class inheriting a specific protocol. Typed array protocol extensions With typed array extensions you can create methods for Arrays containing a specific type only. For example, if you …