Latest 0.1
Homepage https://github.com/ashfurrow/Haste
License MIT
Platforms ios 8.0, requires ARC
Frameworks Foundation
Authors

Everyone has made block NSTimer categories for NSTimer in Objective-C. But who has done it in Swift? Well, probably lots of people, but the point is that it is not as straightforward as you might think.

Usage

  1. Add pod 'Haste' to your Podfile.
  2. Add import Haste whevever you want to time things with closures.
  3. Call the following function.

    NSTimer.scheduledTimerWithTimeInterval(1, block: { () -> () in
        println("Why does anyone do the things they do?")
    }, repeats: true)
    
  4. That function returns the NSTimer instance, so you can call invalidate() on it when you want things to stop.

Latest podspec

{
    "name": "Haste",
    "version": "0.1",
    "summary": "NSTimer Extension for Swift",
    "description": "                   Everyone has made NSTimer categories for `NSTimer` in Objective-C. n                   But who has done it in Swift? Well, probably lots of people, n                   but the point is that it is not as straightforward as you might think. n",
    "homepage": "https://github.com/ashfurrow/Haste",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Ash Furrow": "[email protected]"
    },
    "social_media_url": "http://twitter.com/ashfurrow",
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/ashfurrow/Haste.git",
        "tag": "0.1"
    },
    "source_files": "NSTimer+Haste.swift",
    "frameworks": "Foundation",
    "requires_arc": true
}

Pin It on Pinterest

Share This