WatchActiviyIndicator 0.0.5

WatchActiviyIndicator 0.0.5

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release May 2019
SPMSupports SPM

Maintained by Cem Olcay.



  • By
  • cemolcay

WatchActivityIndicator

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

Demo

alt tag

Requirements

  • watchos 2.0+
  • Swift 5.0+
  • Xcode 10.2+

Install

Cocoapods

target 'your_watch_extension_target' do 
  platform :watchos, 2.0
  pod 'WatchActiviyIndicator'
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