CocoaPods trunk is moving to be read-only. Read more on the blog, there are 19 months to go.

NotificationManager 0.2.0

NotificationManager 0.2.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release May 2017
SwiftSwift Version 3.0
SPMSupports SPM

Maintained by Tim Bodeit.



  • By
  • Tim Bodeit

NotificationManager

NotificationManager is a block-based NSNotificationCenter wrapper, that deregisters automatically on deallocation.

Usage

Create one NotificationManager instance per object.

import NotificationManager 

class Foo {
  let notificationManager = NotificationManager()

  init() {
    notificationManager.registerObserver("BarNotification") { [unowned self] notification in
      // TODO: handle notification
    }
  }
}

Installation

NotificationManager is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "NotificationManager"

Author

Pod created by Tim Bodeit, [email protected]

Most of the credit goes to More indirection

License

NotificationManager is available under the MIT license. See the LICENSE file for more info.