To run the example project, clone the repo, and run pod install
from the Example directory first.
The run Test.m
.
ZDMediator is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'ZDMediator'
- Macho自动注册 或 手动注册
- 生命周期可以自主控制
- 实例方法协议、类方法协议
- 事件分发
- 注册
/// 自动注册
// 一对一
ZDMediator1V1Register(CatProtocol, ZDCat)
// 一对多
ZDMediator1VMRegister(ZDMCommonProtocol, ZDCat, 1)
------
/// 手动注册
[ZDM1V1 manualRegisterService:@protocol(ZDClassProtocol) implementer:self weakStore:YES];
- 读取
NSString *sex = [GetService(CatProtocol) sex];
Zero.D.Saber, fuxianchao@gmail.com
ZDMediator is available under the MIT license. See the LICENSE file for more info.