Latest 1.0.6
Homepage https://github.com/xinghanjie/YXDelayTask
License MIT
Platforms ios 7.0, requires ARC
Authors

License MIT 
CocoaPods 
Support 

Support for the cancellation of the delayed task framework.

Features

  • Delay: Deferred execution code.
  • Queue: Support for specifying thread queue.
  • Cancel: Support cancellation delay task .

Usage

    YXDelayTask *delayTask = [YXDelayTask delay:1.0 task:^{
        NSLog(@"heiheihei");
    }];

    [delayTask cancel];

    YXDelayTask *delayTask1 = [YXDelayTask delay:3.0 queue:self.queue task:^{
        NSLog(@"hahaha");
    }];

    // 延迟2.5秒取消
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.5 * NSEC_PER_SEC)), self.queue, ^{
        [delayTask1 cancel];
    });

Installation

CocoaPods

  1. Add pod 'YXDelayTask' to your Podfile.
  2. Run pod install or pod update.
  3. import <YXDelayTask/YXDelayTask.h>.

Latest podspec

{
    "name": "YXDelayTask",
    "summary": "Support for the cancellation of the delayed task framework.",
    "version": "1.0.6",
    "homepage": "https://github.com/xinghanjie/YXDelayTask",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Heikki": "[email protected]"
    },
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/xinghanjie/YXDelayTask.git",
        "tag": "1.0.6"
    },
    "source_files": "YXDelayTask/*.{h,m}",
    "requires_arc": true,
    "public_header_files": "YXDelayTask/*.{h}"
}

Pin It on Pinterest

Share This