Latest 0.0.3
Homepage https://github.com/cemolcay/WatchActivityIndicator
License MIT
Platforms watchos 2.0, requires ARC
Frameworks WatchKit, Foundation
Authors

WatchActivityIndicator

Apple Watch WKInterfaceImage and WKInterfaceGroup extension for showing activity indicators on them quickly.

Demo

alt tag

Requirements

  • watchos2.0+
  • Swift 2.0+
  • Xcode 7+

Install

Cocoapods

target 'your_watch_extension_target' do
    platform :watchos, 2.0
    pod 'WatchActivityIndicator'
end

Usage

Call startActivityIndicator and stopActivityIndicator functions on any WKInterfaceImage or WKInterfaceGroup instance for default activity indicator.

// start
imageView?.startActivityIndicator()
group?.startActivityIndicator()
// stop
imageView?.stopActivityIndicator()
group?.stopActivityIndicator()

You can set parameters of startActivityIndicator for custom animation sequance and duration.

imageView?.startActivityIndicator(
    imageNamed: "CustomAnimation",
    animationRange: NSMakeRange(0, frameCount),
    duration: customAnimationDuration)

Works on any image view or group.

alt tag

Latest podspec

{
    "name": "WatchActiviyIndicator",
    "version": "0.0.3",
    "summary": "Apple Watch WKInterfaceImage and WKInterfaceGroup extension for showing activity indicators on them quickly.",
    "description": "WatchActivityIndicatorn===nnApple Watch [`WKInterfaceImage`](https://developer.apple.com/library/ios/documentation/WatchKit/Reference/WKInterfaceImage_class/) and [`WKInterfaceGroup`](https://developer.apple.com/library/ios/documentation/WatchKit/Reference/WKInterfaceGroup_class/) extension for showing activity indicators on them quickly.nnDemon----nn![alt tag]()nnRequirementsn----nn* watchos2.0+n* Swift 3.0+n* Xcode 8+nnInstalln----nn#### Cocoapodsn``` rubyntarget 'your_watch_extension_target'nplatform :watchos, 2.0npod 'WatchActivityIndicator'nendn```nnUsagen----nnCall `startActivityIndicator` and `stopActivityIndicator` functions on any [`WKInterfaceImage`](https://developer.apple.com/library/ios/documentation/WatchKit/Reference/WKInterfaceImage_class/) or [`WKInterfaceGroup`](https://developer.apple.com/library/ios/documentation/WatchKit/Reference/WKInterfaceGroup_class/) instance for default activity indicator.nn``` swiftn// startnimageView?.startActivityIndicator()ngroup?.startActivityIndicator()n// stopnimageView?.stopActivityIndicator()ngroup?.stopActivityIndicator()n```nnYou can set parameters of `startActivityIndicator` for custom animation sequance and duration.nn``` swiftnimageView?.startActivityIndicator(nimageNamed: "CustomAnimation",nanimationRange: NSMakeRange(0, frameCount),nduration: customAnimationDuration)n```",
    "homepage": "https://github.com/cemolcay/WatchActivityIndicator",
    "license": "MIT",
    "authors": {
        "cemolcay": "[email protected]"
    },
    "platforms": {
        "watchos": "2.0"
    },
    "source": {
        "git": "https://github.com/cemolcay/WatchActivityIndicator.git",
        "tag": "0.0.3"
    },
    "source_files": "WatchApp Extension/WatchActivityIndicator.swift",
    "resources": "WatchApp Extension/Assets.xcassets",
    "frameworks": [
        "WatchKit",
        "Foundation"
    ],
    "requires_arc": true,
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This