Latest 1.2.0
Homepage https://github.com/raymondjavaxx/SpinKit-ObjC
License MIT
Platforms ios 6.0, requires ARC
Authors

SpinKit-ObjC

UIKit port of SpinKit.

Installing

CocoaPods is the recommended way for adding SpinKit to your project.

pod 'SpinKit', '~> 1.1'

If you are not yet using CocoaPods, I definetly recommend you to check out their Getting Started guide and the NSHipster article.

Usage

Simply instantiate RTSpinKitView with the desired style and add to your view hierarchy.

#import <SpinKit/RTSpinKitView.h>
...
RTSpinKitView *spinner = [[RTSpinKitView alloc] initWithStyle:RTSpinKitViewStyleWave];
[self.view addSubview:spinner];

You can change the size of the spinner by manipulating the spinnerSize property. The default size is 37.0.

spinner.spinnerSize = 100.0;
[spinner sizeToFit];

Available styles:

  • RTSpinKitViewStylePlane
  • RTSpinKitViewStyleCircleFlip
  • RTSpinKitViewStyleBounce
  • RTSpinKitViewStyleWave
  • RTSpinKitViewStyleWanderingCubes
  • RTSpinKitViewStylePulse
  • RTSpinKitViewStyleChasingDots
  • RTSpinKitViewStyleThreeBounce
  • RTSpinKitViewStyleCircle
  • RTSpinKitViewStyle9CubeGrid
  • RTSpinKitViewStyleWordPress
  • RTSpinKitViewStyleFadingCircle
  • RTSpinKitViewStyleFadingCircleAlt
  • RTSpinKitViewStyleArc
  • RTSpinKitViewStyleArcAlt

MBProgressHUD

SpinKit integrates nicely with the amazing MBProgressHUD library:

RTSpinKitView *spinner = [[RTSpinKitView alloc] initWithStyle:RTSpinKitViewStyleWave color:[UIColor whiteColor]];

MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
hud.square = YES;
hud.mode = MBProgressHUDModeCustomView;
hud.customView = spinner;
hud.labelText = NSLocalizedString(@"Loading", @"Loading");

[spinner startAnimating];

Acknowledgements

Animations based on SpinKit by Tobias Ahlin.

SpinKit Contributors.

Latest podspec

{
    "name": "SpinKit",
    "version": "1.2.0",
    "authors": {
        "Ramon Torres": "[email protected]"
    },
    "homepage": "https://github.com/raymondjavaxx/SpinKit-ObjC",
    "summary": "UIActivityIndicatorView replacement with multiple styles and animations.",
    "source": {
        "git": "https://github.com/raymondjavaxx/SpinKit-ObjC.git",
        "tag": "1.2.0"
    },
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "platforms": {
        "ios": "6.0"
    },
    "public_header_files": "SpinKit/RTSpinKitView.h",
    "source_files": "SpinKit/**/*.{m,h}",
    "requires_arc": true
}

Pin It on Pinterest

Share This