Latest 0.1.7
Homepage https://github.com/nathanwchan/JumpingJacker
License MIT
Platforms watchos 3.0
Authors

Jumping jack detector for ⌚️ (watchOS)

Requirements

  • watchOS 3.0+
  • Xcode 8.0+

Installation

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

pod "JumpingJacker"

Example usage

import WatchKit
import Foundation
import JumpingJacker

class InterfaceController: WKInterfaceController {
    var jumpingJacker: JumpingJacker = JumpingJacker(movementSensitivity: .normal)
    var jumpingJackCount: Int = 0

    @IBOutlet var jumpingJackCountLabel: WKInterfaceLabel!

    override func awake(withContext context: Any?) {
        super.awake(withContext: context)

        jumpingJacker.delegate = self
        jumpingJacker.start()
    }
}

extension InterfaceController: JumpingJackerDelegate {
    func jumpingJackerDidJumpingJack(_ jumpingJacker: JumpingJacker) {
        jumpingJackCount += 1
        DispatchQueue.main.async {
            self.jumpingJackCountLabel.setText(String(describing: self.jumpingJackCount))
        }
    }

    func jumpingJacker(_ jumpingJacker: JumpingJacker, didFailWith error: Error) {
        print(error.localizedDescription)
    }
}

Author

Nathan Chan, [email protected]

License

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

Latest podspec

{
    "name": "JumpingJacker",
    "version": "0.1.7",
    "summary": "Jumping jack detector for u231aufe0f (watchOS)",
    "description": "Jumping jack detector for u231aufe0f (watchOS).",
    "homepage": "https://github.com/nathanwchan/JumpingJacker",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Nathan Chan": "[email protected]"
    },
    "source": {
        "git": "https://github.com/nathanwchan/JumpingJacker.git",
        "tag": "0.1.7"
    },
    "platforms": {
        "watchos": "3.0"
    },
    "source_files": "JumpingJacker/Classes/**/*",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This