Simple GCD delayer wrapper written in Swift
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Art
SwiftDelayer.xcodeproj
SwiftDelayer.xcworkspace
SwiftDelayer
SwiftDelayerTests
.gitignore
.travis.yml
LICENSE
Podfile
Podfile.lock
README.md
SwiftDelayer.podspec

README.md

SwiftDelayer Build Status codecov.io CocoaPods Compatible GitHub license

Swift Delayer

Just a simple wrapper for the GCD delay functionality written in Swift

Installation

Get SwiftDelayer on CocoaPods, just add pod 'SwiftDelayer' to your Podfile and then run pod install

Usage

import SwiftDelayer

Delayer.delayOnMainQueue(seconds: 2.0){
    print("I was delayed for 2 seconds :-)")            
}

You can also delay on a specific Queue

import SwiftDelayer

let backgroundQueue = dispatch_get_global_queue(QOS_CLASS_BACKGROUND, 0)

Delayer.delayOnQueue(seconds: 3.0, queue: backgroundQueue){
    print("I was delayed for 3 seconds :-)")            
}

Author

Chris Jimenez - http://chrisjimenez.net, @chrisjimeneznat