Latest 0.1.0
Homepage https://github.com/NilStack/NKWatchActivityIndicator
License MIT
Platforms watchos 2.0, requires ARC
Frameworks UIKit, WatchKit
Authors

Verision
Platform
License

An activity indicator library for Apple Watch and a sample to push the limits of animation in watchOS 2. We are trying to implement beautiful indicators in this fork of DGActivityIndicatorView and support ball scale, ball scale ripple, tow dots, three dots, ball zigzag, ball zigzag deflect animations now and will integrate more.
Static screenshots can’t show the animation effect, please make sure see the gif below.

gif

Usage

Cocoapods

In your watchOS target

pod 'NKWatchActivityIndicator'

Then

pod install

And

#import "NKWActivityIndicatorAnimation.h"

Using Cocoapods with watchOS 2 by Justin Ehlert

Integrating CocoaPods into native watchOS targets by Boris Bügling

Copy NKWatchActivityIndicator folder to watch app extension

Note: because the limition of WatchKit, maybe you need to use similiar UI elements and layouts as we did in demo for some animation effects

Requirements

  • watchOS ~> 2.0
  • Xcode >= 7.0

Examples

Add and layout UI elements in storyboard as we did in demo or customize to meet your requirements
Then

- (void)willActivate {
// This method is called when watch view controller is about to be visible to user
[super willActivate];

self.animation = [[NKWActivityIndicatorAnimation alloc] initWithType:NKWActivityIndicatorAnimationTypeBallScale controller:self images:@[self.indicatorImage]];

[self.animation startAnimating];
}

- (void)didDeactivate {
// This method is called when watch view controller is no longer visible
[super didDeactivate];

[self.animation stopAnimating];

}

TODO

  • more testing
  • refactoring
  • more indicator types

License

This code is distributed under the terms and conditions of the MIT license.

Thanks

Awesome activity indicator library DGActivityIndicatorView

Latest podspec

{
    "name": "NKWatchActivityIndicator",
    "version": "0.1.0",
    "summary": "An activity indicator library for Apple Watch and a sample to push the limit of animation in watchOS 2.",
    "description": "An activity indicator library for Apple Watch and a sample to push the limit of animation in watchOS 2.nWe are trying to implement beautiful indicators in this fork of DGActivityIndicatorView and support ball scale, ball scale ripple, tow dots, three dots, ball zigzag, ball zigzag deflect animations now and will integrate more.",
    "homepage": "https://github.com/NilStack/NKWatchActivityIndicator",
    "screenshots": "https://db.tt/UAWEZ1AF",
    "license": "MIT",
    "authors": {
        "Peng Guo": "[email protected]"
    },
    "social_media_url": "http://twitter.com/NilStack",
    "platforms": {
        "watchos": "2.0"
    },
    "source": {
        "git": "https://github.com/NilStack/NKWatchActivityIndicator.git",
        "tag": "0.1.0"
    },
    "watchos": {
        "source_files": [
            "NKWatchActivityIndicator/*.{h,m}",
            "NKWatchActivityIndicator/Animations/*.{h,m}"
        ]
    },
    "frameworks": [
        "UIKit",
        "WatchKit"
    ],
    "requires_arc": true
}

Pin It on Pinterest

Share This