Latest 1.0.0
Homepage https://github.com/Meniny/Every
License MIT
Platforms ios 8.0, osx 10.10, tvos 9.0, watchos 2.0
Authors

Introduction

Every is an elegant timer in Swift.

Requirements

  • iOS 8.0+
  • watchOS 2.0+
  • tvOS 9.0+
  • macOS 10.10+
  • Xcode 9 with Swift 4

Installation

CocoaPods

use_frameworks!
pod 'Every'

Usage

import Every
var counter = 0
Every(1).seconds.do { () -> Every.NextStep in
    counter += 1
    guard counter <= 4 else {
        print("STOP")
        return .stop
    }
    print(counter)
    return .continue
}
// 1
// 2
// 3
// 4
// STOP

Latest podspec

{
    "name": "Every",
    "version": "1.0.0",
    "summary": "Elegant Timer in Swift",
    "homepage": "https://github.com/Meniny/Every",
    "license": "MIT",
    "authors": {
        "Elias Abel": "[email protected]"
    },
    "source": {
        "git": "https://github.com/Meniny/Every.git",
        "tag": "1.0.0"
    },
    "social_media_url": "https://meniny.cn/",
    "platforms": {
        "ios": "8.0",
        "osx": "10.10",
        "tvos": "9.0",
        "watchos": "2.0"
    },
    "source_files": "Every/**/*",
    "ios": {
        "frameworks": "Foundation"
    },
    "osx": {
        "frameworks": "Cocoa"
    },
    "tvos": {
        "frameworks": "Foundation"
    },
    "watchos": {
        "frameworks": "Foundation"
    },
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This