Giter VIP home page Giter VIP logo

iactivityindicator's Introduction

ActivityIndicator

An Elegant And Customizable Pure SwiftUI Activity Indicators.

Examples

Code Demo
Arcs-Code Arcs
Blinking-Code Blinking
RotatingShapesCode RotatingShapes
RowOfShapes-Code RowOfShaoes
Bars-Code Bars

The Demo Code

Just import the library and use the following code as the ContentView

import SwiftUI
import iActivityIndicator

struct ContentView: View {
    var body: some View {
        VStack(spacing: 24) {

            HStack(spacing: 24) {
                iActivityIndicator(style: .arcs())
                iActivityIndicator(style: .arcs(width: 8))
                iActivityIndicator(style: .arcs(count: 10))
            }

            HStack(spacing: 24) {
                iActivityIndicator(style: .bars(opacityRange: 1...1))
                iActivityIndicator(style: .bars(scaleRange: 1...1))
                iActivityIndicator(style: .bars(count: 3))
            }

            HStack(spacing: 24) {
                iActivityIndicator(style: .blinking())
                iActivityIndicator(style: .blinking(count: 4))
                iActivityIndicator(style: .blinking(count: 3, size: 50))
            }

            HStack(spacing: 24) {
                iActivityIndicator() // The Default
                iActivityIndicator(style: .classic(count: 13, width: 2))
                iActivityIndicator(style: .classic(count: 3, width: 50))
            }

            HStack(spacing: 24) {
                iActivityIndicator(style: .rotatingShapes())
                iActivityIndicator(style: .rotatingShapes(count: 3, size: 30))
                iActivityIndicator(style: .rotatingShapes(content: AnyView(Text("๐ŸŽƒ").fixedSize())))
            }

            HStack(alignment: .center, spacing: 24) {
                iActivityIndicator(style: .rowOfShapes())
                iActivityIndicator(style: .rowOfShapes(count: 1, opacityRange: 0...1))
                iActivityIndicator(style: .rowOfShapes(count: 3, scaleRange: 0.1...1))
            }
        }
        .padding()
        .foregroundColor(.red)
    }
}

Ease of Use

Also you can use style as a modifer on the iActivityIndicator like:

HStack(spacing: 24) {
    iActivityIndicator()
        .style(.arcs())

    iActivityIndicator()
        .style(.arcs(width: 8))

    iActivityIndicator()
        .style(.arcs(count: 10))
}

iactivityindicator's People

Contributors

mojtabahs avatar

Watchers

James Cloos 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.