Latest 0.1.0
Homepage https://github.com/SachK13/SKActivityIndicatorView
License MIT
Platforms ios 9.0
Frameworks UIKit, Foundation
Authors

SKActivityIndicatorView is a lightweight and easy-to-use ActivityIndicator for your iOS app written in swift.

SKActivityIndicatorView

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Features

  • [x] Four ActivityIndicator Styles
  • [x] ActivityIndicator Customization
  • [x] Easy & Quick Integration

Requirements

  • iOS 9.0+
  • Xcode 9.1+
  • Swift 4.0+

Installation

CocoaPods

To integrate SKActivityIndicatorView into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!

target '<Your Target Name>' do
pod 'SKActivityIndicatorView', '~> 0.1.0'
end

Then, run the following command:

$ pod install

Manual

You can directly add the SKActivityIndicatorView.swift and SKActivityIndicatorViewStyle.swift source files into your Xcode project.

Include SKActivityIndicatorView wherever you need it with import SKActivityIndicatorView.

Usage

(see sample Xcode project in /Example)
To run the example project, clone the repo, and run pod install from the Example directory first.

Import the module.

import SKActivityIndicatorView

Now, you can show only ActivityIndicatorView without status message:

SKActivityIndicator.show()

Display ActivityIndicatorView with status message:

SKActivityIndicator.show("Loading...")

Display ActivityIndicatorView with status message and user interaction status:

SKActivityIndicator.show("Loading...", userInteractionStatus: true)

Hide ActivityIndicatorView:

SKActivityIndicator.dismiss()

Customization

// default is darkGray
SKActivityIndicator.spinnerColor(UIColor.darkGray)

// default is black
SKActivityIndicator.statusTextColor(UIColor.black)

// default is System Font
let myFont = UIFont(name: "AvenirNext-DemiBold", size: 18)
SKActivityIndicator.statusLabelFont(myFont!)

// ActivityIndicator Styles: choose and set one of four.
SKActivityIndicator.spinnerStyle(.defaultSpinner)
SKActivityIndicator.spinnerStyle(.spinningFadeCircle)
SKActivityIndicator.spinnerStyle(.spinningCircle)
SKActivityIndicator.spinnerStyle(.spinningHalfCircles)

License

SKActivityIndicatorView is released under the MIT license. See LICENSE for details.

Latest podspec

{
    "name": "SKActivityIndicatorView",
    "version": "0.1.0",
    "summary": "A lightweight and easy-to-use ActivityIndicator for your iOS app written in swift.",
    "description": "SKActivityIndicatorView is a lightweight and simple ActivityIndicator. Its really easy to integrate and easy-to-use and also has four different ActivityIndicator style with other customization options.",
    "homepage": "https://github.com/SachK13/SKActivityIndicatorView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "SachK13": "[email protected]"
    },
    "source": {
        "git": "https://github.com/SachK13/SKActivityIndicatorView.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "SKActivityIndicatorView/Classes/**/*",
    "frameworks": [
        "UIKit",
        "Foundation"
    ],
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This