Latest 0.1.0
Homepage https://github.com/ripperhe/ZYGCDTimer
License MIT
Platforms ios 8.0
Authors

Version
License
Platform

ZYGCDTimer is based on the MSWeakTimer.

Features

  • Create a timer with block

  • Pause the timer

Example

To run the example project, clone the repo, and run directly.

Requirements

iOS 8.0 or later

Installation

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

pod "ZYGCDTimer"

How To Use

You can use the following method to create a timer, and then use the "fire" method to start the timer.

  • Target-selector

“`objc****

  • (nonnull instancetype)timerWithTimeInterval:(NSTimeInterval)interval
    target:(nonnull id)aTarget
    selector:(nonnull SEL)aSelector
    userInfo:(nullable id)userInfo****
    repeats:(BOOL)repeats
    dispatchQueue:(nonnull dispatch_queue_t)dispatchQueue;

  • Block
+ (nonnull instancetype)timerWithTimeInterval:(NSTimeInterval)interval
                                     userInfo:(nullable id)userInfo
                                      repeats:(BOOL)repeats
                                dispatchQueue:(nonnull dispatch_queue_t)dispatchQueue
                                        block:(nonnull ZYGCDTimerCallbackBlock)block;

Author

ripperhe, [email protected]

License

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

Latest podspec

{
    "name": "ZYGCDTimer",
    "version": "0.1.0",
    "summary": "A timer that doesn't retain the target and supports being used with GCD queues",
    "homepage": "https://github.com/ripperhe/ZYGCDTimer",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "ripperhe": "[email protected]"
    },
    "source": {
        "git": "https://github.com/ripperhe/ZYGCDTimer.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "ZYGCDTimer/**/*"
}

Pin It on Pinterest

Share This