Skip to content

Lightweight activity indicator `SwiftUI` `Package` useful for showing on top of certain `View` while processing data.

License

Notifications You must be signed in to change notification settings

mtdtechnology-net/swiftui-loading-view

 
 

Repository files navigation

LoadingView

This package can be used in oeder to show an activity indicator over certain view.

How LoadingView should look like in action:

Dots

Screen.Recording.2021-03-17.at.15.16.03.mov

Circle

Screen.Recording.2021-03-16.at.18.29.57.mov

How to use it:

import SwiftUI
import LoadingView

struct ExampleView: View {
    
    @State var isLoading: Bool = false
    
    var body: some View {
        VStack {
            Toggle("Show activity indicator", isOn: $isLoading)
            
            // Dots 
            Text("This is My Personal Data")
                .dotsIndicator(when: $isLoading)
                
            // Circle
            Text("This is My Personal Data")
                .circleIndicator(when: $isLoading)
                
            // Container
            Text("This is My Personal Data")
                .containerIndicator(when: $isLoading) {
                    Text("Animated text")
                }
        }
    }
}

Available through:

Swift Package Manager

About

Lightweight activity indicator `SwiftUI` `Package` useful for showing on top of certain `View` while processing data.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 100.0%