A number of preset loading indicators created with SwiftUI

Overview

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+
Comments
  • Incompatible with NavigationView

    Incompatible with NavigationView

    If I put ActivityIndicatorView inside NavigationView, it would have strange behavior, repeatedly move from top left to center.

    NavigationView {
        ActivityIndicatorView(isVisible: .constant(true), type: .arcs)
            .frame(width: 70, height: 70, alignment: .center)
    }
    

    output

    opened by feveral 2
  • fix no shared framework schemes

    fix no shared framework schemes

    The following error occurs when building with carthage.

    *** Skipped building ActivityIndicatorView due to the error: Dependency "ActivityIndicatorView" has no shared framework schemes for any of the platforms: iOS If you believe this to be an error, please file an issue with the maintainers at https://github.com/Exyte/ActivityIndicatorView/issues/new

    I fixed the error by adding ActivityIndicatorView.xcscheme.

    opened by fjswrk 1
  • Added Optional Color Parameter for .growingArc

    Added Optional Color Parameter for .growingArc

    Problem: By default, the stroke color of the arc is Color.red. Unable to override using foregroundColor.

    Solution: Add optional color parameter with the default value of Color.red, allowing user to customize the stroke color.

    opened by jpsison-io 1
  • If view size changes, the activity indicator (.gradient) slides left and right continuously

    If view size changes, the activity indicator (.gradient) slides left and right continuously

    I'm running a simple view with an activity indicator int he middle of it, on ipad simulator (ios 14). In multiwindow mode, when the size of the view changes, the .gradient view keeps rolling back and forth :-) quite an interesting one. Aloha Q

    opened by quantamrhino 1
  • Some animations not animating

    Some animations not animating

    I ran the sample project, but not all the animations are working like in your demo animation: Apr-25-2020 21-55-22

    I did a pod install in the Example directory and ran the project... but as you can see, not everything is animating.

    opened by lepolt 1
  • #7 Fix Sliding Bug

    #7 Fix Sliding Bug

    I hope that I didn't break anything. I’ve fixed the bug for gradient indicator, then I noticed that it is repeated for other indicators and fixed too.

    opened by mnndnl 0
Owner
Exyte
Exyte
Blobmorphism is a brand new design language I've created to break free of the material overload in iOS, built in SwiftUI. Everything feels smooth and fluid.

Blobmorphism is a brand new design language I've created to break free of the material overload in iOS, built in SwiftUI. Everything feels smooth and fluid.

Ethan Lipnik 89 Nov 29, 2022
Play BreakOut while loading - A playable pull to refresh view using SpriteKit

BreakOutToRefresh Play BreakOut while loading - A playable pull to refresh view using SpriteKit BreakOutToRefresh uses SpriteKit to add a playable min

Dominik Hauser 2.5k Jan 5, 2023
Beautiful animated placeholders for showing loading of data

KALoader Create breautiful animated placeholders for showing loading of data. You can change colors like you want. Swift 4 compatible. Usage To add an

Kirill Avery 105 May 2, 2022
An easy way to add a shimmering effect to any view with just one line of code. It is useful as an unobtrusive loading indicator.

LoadingShimmer An easy way to add a shimmering effect to any view with just single line of code. It is useful as an unobtrusive loading indicator. Thi

Jogendra 1.4k Jan 4, 2023
A collection of awesome loading animations

NVActivityIndicatorView ⚠️ Check out LoaderUI (ready to use with Swift Package Mananger supported) for SwiftUI implementation of this. ?? Introduction

Vinh Nguyen 10.3k Dec 27, 2022
Placeholder views based on content, loading, error or empty states

StatefulViewController A protocol to enable UIViewControllers or UIViews to present placeholder views based on content, loading, error or empty states

Alexander Schuch 2.1k Dec 8, 2022
Windless makes it easy to implement invisible layout loading view.

Windless Windless makes it easy to implement invisible layout loading view. Contents Requirements Installation Usage Looks Credits Communication Licen

ArLupin 940 Dec 22, 2022
This is the replica of Foursquare application, created using storyboard.

FourSquare-Storyboard- This is the replica of Foursquare application, created using storyboard. API Usage from Foursuare Places Search Get Place Detai

Yasir Siddique 2 Oct 31, 2022
CITreeView created to implement and maintain that wanted TreeView structures for IOS platforms easy way

CITreeView CITreeView created to implement and maintain that wanted TreeView structures for IOS platforms easy way. CITreeView provides endless treevi

Cenk Işık 126 May 28, 2022
A paging scroll view for SwiftUI, using internal SwiftUI components

PagingView A paging scroll view for SwiftUI, using internal SwiftUI components. This is basically the same as TabView in the paging mode with the inde

Eric Lewis 18 Dec 25, 2022
SwiftUI-Drawer - A bottom-up drawer in swiftUI

SwiftUI-Drawer A bottom-up drawer view. Contents Installation Examples Installat

Bruno Wide 9 Dec 29, 2022
SwiftUI-Margin adds a margin() viewModifier to a SwiftUI view.

SwiftUI-Margin adds a margin() viewModifier to a SwiftUI view. You will be able to layout the margins in a CSS/Flutter-like.

Masaaki Kakimoto(柿本匡章) 2 Jul 14, 2022
A better way to present a SFSafariViewController or start a ASWebAuthenticationSession in SwiftUI.

BetterSafariView A better way to present a SFSafariViewController or start a ASWebAuthenticationSession in SwiftUI. Contents Motivation Requirements U

Dongkyu Kim 392 Dec 31, 2022
A SwiftUI Library for creating resizable partitions for View Content.

Partition Kit Recently Featured In Top 10 Trending Android and iOS Libraries in October and in 5 iOS libraries to enhance your app! What is PartitionK

Kieran Brown 230 Oct 27, 2022
A micro UIStackView convenience API inspired by SwiftUI

Stacks A micro UIStackView convenience API inspired by SwiftUI. let stack: UIView = .hStack(alignment: .center, margins: .all(16), [ .vStack(spaci

Alexander Grebenyuk 74 Jul 27, 2022
SwiftUI: Components Library Inspired by Twitter's Bootstrap

bootswiftui SwiftUI: Components Library Inspired by Twitter's Bootstrap Warning This is just SwiftUI exercise. Please do not consider using this repo

Robert Sandru 1 Oct 27, 2022
Zeplin component preview for your SwiftUI views

A Zeplin component preview for your SwiftUI views. You can use Zeplin components instead of real views within your app until you implement them.

Danis Tazetdinov 4 Sep 1, 2022
A SwiftUI Views for wrapping HStack elements into multiple lines

SwiftUI WrappingStack A SwiftUI Views for wrapping HStack elements into multiple lines. List of supported views WrappingHStack - provides HStack that

Denis 50 Jan 6, 2023
Create SwiftUI Views with any data

Create SwiftUI Views with any data

Zach Eriksen 20 Jun 27, 2022