TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | May 2017 |
SwiftSwift Version | 3.0 |
SPMSupports SPM | ✗ |
Maintained by Tim Bodeit.
NotificationManager is a block-based NSNotificationCenter wrapper, that deregisters automatically on deallocation.
Create one NotificationManager instance per object.
import NotificationManager
class Foo {
let notificationManager = NotificationManager()
init() {
notificationManager.registerObserver("BarNotification") { [unowned self] notification in
// TODO: handle notification
}
}
}
NotificationManager is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "NotificationManager"
Pod created by Tim Bodeit, [email protected]
Most of the credit goes to More indirection
NotificationManager is available under the MIT license. See the LICENSE file for more info.