Latest 0.1.0
Homepage https://github.com/yishuiliunian/MRAppDelegateComponents
License MIT
Platforms ios 8.0
Dependencies MRLogicInjection
Authors

CI Status
Version
License
Platform

AppDelegate 组件化拆分基础框架,可以让您将AppDelegate多个复杂的回调拆解到不同的模块中。

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

  1. MRLoginInjection (实例逻辑注入框架)

Installation

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

pod 'MRAppDelegateComponents'

Usage

将需要拆分的逻辑单独拆成类,然后让该类实现协议 MRApplicationDelegateInjectionProtocol 即可。同事需要注意判断父类是否实现了对应方法,如果实现了则需要调用他。

#import <MRAppDelegateComponents/MRAppDelegateComponents.h>
@interface MRAppDelegateLogic1 () <UIApplicationDelegate, MRApplicationDelegateInjectionProtocol>

@end
@implementation MRAppDelegateLogic1
- (BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    SEL sel = @selector(application:didFinishLaunchingWithOptions:);
    if (__MRSuperImplatationCurrentCMD__(sel)) {
        MRPrepareSendSuper(BOOL, id, id);
        MRSendSuperSelector(sel, application, launchOptions);
    }
    NSLog(@"MRAppDelegateLogic1 handle");
    return YES;
}
@end

Author

[email protected], [email protected]

License

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

Latest podspec

{
    "name": "MRAppDelegateComponents",
    "version": "0.1.0",
    "summary": "A short description of MRAppDelegateComponents.",
    "description": "TODO: Add long description of the pod here.",
    "homepage": "https://github.com/yishuiliunian/MRAppDelegateComponents",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "[email protected]": "[email protected]"
    },
    "source": {
        "git": "https://github.com/yishuiliunian/MRAppDelegateComponents.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "MRAppDelegateComponents/Classes/**/*",
    "dependencies": {
        "MRLogicInjection": []
    }
}

Pin It on Pinterest

Share This