Latest 0.3.0
Homepage https://github.com/carlSQ/FKCoupling
License MIT
Platforms ios 7.0
Authors

CI Status
Version

Usage

register response object

when obejct init ,you shuold register


- (void)viewDidLoad {
  [super viewDidLoad];
  @FKCOUPLING(self);
}

send message

send message to register object

[FKCoupling handleCoupling:@protocol(FKTestProtocol) selector:@selector(testProtocol:) args:@[@"fuck "]];

[FKCoupling handleCoupling:@protocol(FKTestProtocol) selector:@selector(testProtocolCount:) args:@[@(100)]];

find response object

find register object and do something

[FKCoupling handleCoupling:@protocol(FKTestProtocol) execute:^(id<FKTestProtocol> couplingObject) {
  if ([couplingObject respondsToSelector:@selector(testProtocol:)]) {
  [couplingObject testProtocol:@"test"];
}
if ([couplingObject respondsToSelector:@selector(testProtocolCount:)]) {
  [couplingObject testProtocolCount:8888];
}
}];

send message for data decoupling

only need protocal name,method,args, no dependence


[FKCoupling handleCouplingWithProtocolName:@"FKTestProtocol" selectorName:@"testProtocolCount:" args:@[@(100)]];
[FKCoupling handleCouplingWithProtocolName:@"FKTestProtocol" selectorName:@"testProtocol:" args:@[@"fuck"]];

Installation

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

pod "FKCoupling"

Author

carl shen

License

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

Latest podspec

{
    "name": "FKCoupling",
    "version": "0.3.0",
    "summary": "a page data decoupling",
    "homepage": "https://github.com/carlSQ/FKCoupling",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "sq": "[email protected]"
    },
    "source": {
        "git": "https://github.com/carlSQ/FKCoupling.git",
        "tag": "0.3.0"
    },
    "platforms": {
        "ios": "7.0"
    },
    "source_files": "FKCoupling/Classes/**/*"
}

Pin It on Pinterest

Share This