Latest 1.0
Homepage https://github.com/li6185377/IMYAsyncBlock
License MIT
Platforms ios 5.0, osx 10.7, requires ARC
Authors

使用方法很简单。

    ///创建一个异步执行block   一个key对应一个block
    NSString *queueKey = NSStringFromSelector(_cmd);
    [NSObject imy_asyncBlock:^{
            ///do something
    } onQueue:dispatch_get_global_queue(0, 0) afterSecond:2 forKey:queueKey];

     ///该key 是否还有未执行的Block
    BOOL hasContain = [NSObject imy_hasAsyncBlockForKey:queueKey];

    ///取消该block
    [NSObject imy_cancelBlockForKey:queueKey];

Latest podspec

{
    "name": "IMYAsyncBlock",
    "version": "1.0",
    "summary": "u53efu53d6u6d88u7684u5f02u6b65Blocku6267u884cu65b9u5f0fuff0cAsynchronous Block can be cancelled",
    "description": "u53efu53d6u6d88u7684u5f02u6b65Blocku6267u884cu65b9u5f0fuff0cAsynchronous Block can be cancelledu3002u3002u3002",
    "homepage": "https://github.com/li6185377/IMYAsyncBlock",
    "license": "MIT",
    "authors": {
        "Jianghuai Li": "[email protected]"
    },
    "source": {
        "git": "https://github.com/li6185377/IMYAsyncBlock.git",
        "tag": "1.0"
    },
    "platforms": {
        "ios": "5.0",
        "osx": "10.7"
    },
    "source_files": "Classes/**/*.{h,m}",
    "requires_arc": true
}

Pin It on Pinterest

Share This