Git Product home page Git Product logo

zvactivityindicatorview's Introduction

ZVActivityIndicatorView

Carthage compatible CocoaPods Compatible Package compatible

Platform

ZVActivityIndicatorView is an activity indicator substitute control.

Requirements

  • iOS 8.0+
  • Swift 5.0

Installation

Cocoapod

CocoaPods is a dependency manager for Swift and Objective-C Cocoa projects.

You can install Cocoapod with the following command

$ sudo gem install cocoapods

To integrate ZVActivityIndicatorView into your project using CocoaPods, specify it into your Podfile

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'

target 'TargetName' do
    use_frameworks!
    pod 'ZVActivityIndicatorView', '~> 0.2.1'
end

Then,install your dependencies with CocoaPods.

$ pod install

Carthage

Carthage is intended to be the simplest way to add frameworks to your application.

You can install Carthage with Homebrew using following command:

$ brew update
$ brew install carthage

To integrate ZVActivityIndicatorView into your project using Carthage, specify it into your Cartfile

github "zevwings/ZVActivityIndicatorView" ~> 0.2.1

Then,build the framework with Carthage using carthage update and drag ZVActivityIndicatorView into your project.

Swift Package Manager

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler. It is in early development, but Alamofire does support its use on supported platforms.

Once you have your Swift package set up, adding Alamofire as a dependency is as easy as adding it to the dependencies value of your Package.swift.

dependencies: [
    .package(url: "https://github.com/zevwings/ZVActivityIndicatorView.git", from: "0.2.1")
]

Note:

The framework is under the Carthage/Build, and you should drag it into Target -> Genral -> Embedded Binaries

Usage

You can use import ZVActivityIndicatorView when you needed to use ZVActivityIndicatorView.

let activityIndicator = ActivityIndicatorView()

startAnimating

activityIndicator.startAnimating()

stopAnimating

activityIndicator.startAnimating()

Custom

You can use the following properties custom style.

/// get the animate status
public private(set) var isAnimating: Bool = false

// set the animating duration
public var duration: TimeInterval = 1.25

// set the animating timing function
public var timingFunction: CAMediaTimingFunction?

// set the stroke with of indicator circle
public var strokeWidth: CGFloat = 1.0

// set the color of indicator
override public var tintColor: UIColor!

// set the indicator view is hidden when stop animating
public var hidesWhenStopped: Bool = true

License

ZVActivityIndicatorView distributed under the terms and conditions of the MIT License

zvactivityindicatorview's People

Contributors

zevwings avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

carabina

zvactivityindicatorview's Issues

ZVActivityIndicatorView

func removeObserver() {
guard isObserved else { return }
isObserved = false
NotificationCenter.default.removeObserver(self)
}

此处删除通知错写成add,方便请做下修改

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.