一个非常容易使用的多观察者模式的观察者中心,是一个很好的NSNotificationCenter的替代品
To run the example project, clone the repo, and run pod install
from the Example directory first.
ZEDObserversCenter is available through CocoaPods. To install
it, simply add the following line to your Podfile:
pod "ZEDObserversCenter"
1. without key
ADD_OBSERVER(protocol, observer)
REMOVE_OBSERVER(protocol, observer)
NOTIFY_OBSERVERS(protocol, func)
2. with a key
ADD_OBSERVER_WITH_KEY(protocol, key, observer)
REMOVE_OBSERVER_WITH_KEY(protocol, key, observer)
NOTIFY_OBSERVERS_WITH_KEY(protocol, key, func)
李超, 964139523@qq.com
ZEDObserversCenter is available under the MIT license. See the LICENSE file for more info.