Latest 1.0.0
Homepage https://github.com/donnywdavis/DDProgressIndicator
License MIT
Platforms ios 9.0
Authors

Version
License
Platform

DDProgressIndicator is a simple class that can be used to display an activity indicator over any UIViewController.

Example

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

Installation

DDProgressIndicator is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "DDProgressIndicator"

Usage

Import DDProgressIndicator and make sure that your view controller conforms to the DDProgressIndicatorDelegate protocol.

import DDProgressIndicator

class ViewController: UIViewController, DDProgressIndicatorDelegate {
    ...
}

Create a reference to the DDProgressIndicatorView class and set the delegate.

lazy var ddProgressIndicatorView: DDProgressIndicatorView = {
    var ddProgressIndicatorView = DDProgressIndicatorView(frame: CGRect(x: 0.0, y: 0.0, width: self.view.frame.width, height: self.view.frame.height))
    ddProgressIndicatorView.delegate = self
    return ddProgressIndicatorView
}()

There are two main methods to call to start and stop the activity indicator. Call these methods whenever you need to display the activity indicator.

ddProgressStartActivity()
ddProgressStopActivity()

There are three optional methods that can be used to modify the color for the activity spinner, the loading label, and the background.

func ddProgressIndicatorSetSpinnerColor() -> UIColor? {
    return UIColor.blueColor()
}
func ddProgressIndicatorSetLabelColor() -> UIColor? {
    return UIColor.blueColor()
}
func ddProgressIndicatorSetBackgroundColor() -> UIColor? {
    return UIColor.redColor()
}

Latest podspec

{
    "name": "DDProgressIndicator",
    "version": "1.0.0",
    "summary": "A protocol to display an activity spinner for any UIViewController.",
    "description": "A protocol to display an activity spinner for any UIViewController. The default functions of the protocol willndisplay a UIView centered on the screen with an activity indicator in the middle along with a loading messagenabove it. The color of the text, activity spinner, and the background of the view can be customized.",
    "homepage": "https://github.com/donnywdavis/DDProgressIndicator",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Donny Davis": "donnywdavis@icloud.com"
    },
    "source": {
        "git": "https://github.com/donnywdavis/DDProgressIndicator.git",
        "tag": "1.0.0"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "DDProgressIndicator/Classes/**/*"
}

Pin It on Pinterest

Share This