CocoaPods trunk is moving to be read-only. Read more on the blog, there are 19 months to go.

CPLoadingView 2.0.1

CPLoadingView 2.0.1

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Oct 2016
SPMSupports SPM

Maintained by Wei Zhao.



  • By
  • Wei Zhao

CPLoading

CPLoading shows loading, progress and completion in the animation.

Inspired by the excellent MMMaterialDesignSpinner

Screenshot

Loaded successfully

Loaded unsuccessfully

Installation

Manually

The simplest way to install this library is to copy Classes/CPLoadingView.swift to your project.

Properties

var lineWidth: CGFloat = 2.0

The line width of path of view.

var strokeColor: UIColor = UIColor(red: 0.0, green: 122.0/255.0, blue: 1.0, alpha: 1.0)

The stroke color of path of view.

var fontSize: Float = 30

The font size of progress

var hidesWhenCompleted: Bool = false

Whether to hide view when loading completed

var hidesAfterTime: NSTimeInterval = 0.5

The delay time to hide view

Usage

Start loading

loadingView.startLoading()

Set progress

loadingView.progress = 0.5

Complete loading successfully

loadingView.completeLoading(success: true)

Complete loading unsuccessfully

loadingView.completeLoading(success: false)

Requirements

  • Swift 3.0+
  • Xcode 8.0+

License

Released under the MIT license. See LICENSE for details.