Latest 0.2.1
Homepage https://github.com/sforteln/WatchKitPromises
License MIT
Platforms watchos 2.0, requires ARC
Dependencies PromiseKit
Frameworks WatchKit
Authors

PromiseKit support for WatchKit

Installation

WatchKitPromises is available through CocoaPods. To install
it, simply add the following line to your Podfile in the WatchKit Extension target:

target 'XXXX WatchKit Extension' do

  pod 'WatchKitPromises'

end

Usage

import WatchKitPromises

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

    self.animate(duration: duration, animations: {
        self.startButton?.setAlpha(0)
        self.swipeLabel?.setAlpha(0)
    })
    .wait(2)
    .then(execute: {
        ///API request, etc
        return
    })
    .animate(in: self, duration: 2, animations: {
        self.startButton?.setAlpha(1)
        self.swipeLabel?.setAlpha(1)

    })
}

Author

Simon Fortelny, [email protected]

License

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

Latest podspec

{
    "name": "WatchKitPromises",
    "version": "0.2.1",
    "summary": "A library to add PromiseKit support to WatchKit.",
    "description": "Adds support for WatchKit animations to WatchKit",
    "homepage": "https://github.com/sforteln/WatchKitPromises",
    "license": "MIT",
    "authors": {
        "Simon Fortelny": "[email protected]"
    },
    "source": {
        "git": "https://github.com/sforteln/WatchKitPromises.git",
        "tag": "0.2.1"
    },
    "social_media_url": "https://twitter.com/simonfort",
    "platforms": {
        "watchos": "2.0"
    },
    "requires_arc": true,
    "source_files": "Source/**/*.{swift}",
    "frameworks": "WatchKit",
    "dependencies": {
        "PromiseKit": [
            "~> 4.2"
        ]
    },
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This