Coder Social home page Coder Social logo

brandy2015 / activityindicatorview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from exyte/activityindicatorview

0.0 1.0 0.0 3.87 MB

A number of preset loading indicators created with SwiftUI

License: MIT License

Swift 92.53% Ruby 4.78% Objective-C 2.68%

activityindicatorview's Introduction

ActivityIndicatorView

A number of preset loading indicators created with SwiftUI


We are a development agency building phenomenal apps.




Travis CI Version Carthage Compatible License Platform Twitter

Usage

Create an indicator like this:

ActivityIndicatorView(isVisible: $showLoadingIndicator, type: .default)

where
showLoadingIndicator - bool value you may change to display or hide the indicator
type - value from ActivityIndicatorView.IndicatorType enum

You may alter it with standard SwiftUI means like this:

ActivityIndicatorView(isVisible: $showLoadingIndicator, type: .default)
     .frame(width: 50.0, height: 50.0)
     .foregroundColor(.red)

Indicator types

default - iOS UIActivityIndicator style
arcs
rotatingDots
flickeringDots
scalingDots
opacityDots
equalizer
growingArc - add custom color for growing Arc, the default value is Color.red

ActivityIndicatorView(isVisible: $showLoadingIndicator, type: .growingArc(.red))
    .frame(width: 50.0, height: 50.0)

growingCircle
gradient - circle with angular gradient border stroke, pass colors ilke this:

ActivityIndicatorView(isVisible: $showLoadingIndicator, type: .gradient([.white, .red]))
    .frame(width: 50.0, height: 50.0)

Examples

To try out the ActivityIndicatorView examples:

  • Clone the repo git clone [email protected]:exyte/ActivityIndicatorView.git
  • Open terminal and run cd <ActivityIndicatorViewRepo>/Example
  • Run pod install to install all dependencies
  • Run xed . to open project in the Xcode
  • Try it!

Installation

CocoaPods

pod 'ActivityIndicatorView'

Carthage

github "Exyte/ActivityIndicatorView"

Swift Package Manager

dependencies: [
    .package(url: "https://github.com/exyte/ActivityIndicatorView.git", from: "0.0.1")
]

Manually

Drop ActivityIndicatorView.swift into your project.

Requirements

  • iOS 13+ / watchOS 13+ / tvOS 13+ / macOS 10.15+
  • Xcode 11+

activityindicatorview's People

Contributors

f3dm76 avatar jpsison-io avatar mnndnl avatar shipinev avatar waterskier2007 avatar

Watchers

 avatar

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.