mirror of
https://github.com/exyte/ActivityIndicatorView.git
synced 2026-04-07 19:17:39 +00:00
Reorganize the project; deprecate cocoapods
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// ActivityIndicatorViewExampleApp.swift
|
||||
// ActivityIndicatorViewExample
|
||||
//
|
||||
// Created by Alisa Mylnikova on 25.03.2025.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
@main
|
||||
struct ActivityIndicatorViewExampleApp: App {
|
||||
var body: some Scene {
|
||||
WindowGroup {
|
||||
ContentView()
|
||||
}
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"colors" : [
|
||||
{
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "tinted"
|
||||
}
|
||||
],
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
//
|
||||
// ContentView.swift
|
||||
// Example
|
||||
//
|
||||
// Created by Alisa Mylnikova on 20/03/2020.
|
||||
// Copyright © 2020 Exyte. All rights reserved.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
import ActivityIndicatorView
|
||||
|
||||
struct ContentView: View {
|
||||
|
||||
@State private var showLoadingIndicator: Bool = true
|
||||
|
||||
var body: some View {
|
||||
GeometryReader { geometry in
|
||||
let size = geometry.size.width / 5
|
||||
let spacing: CGFloat = 40.0
|
||||
|
||||
VStack {
|
||||
HStack {
|
||||
Spacer()
|
||||
VStack(spacing: spacing) {
|
||||
Spacer()
|
||||
ActivityIndicatorView(isVisible: $showLoadingIndicator, type: .default())
|
||||
.frame(width: size, height: size)
|
||||
.foregroundColor(.red)
|
||||
ActivityIndicatorView(isVisible: $showLoadingIndicator, type: .arcs())
|
||||
.frame(width: size, height: size)
|
||||
.foregroundColor(.red)
|
||||
ActivityIndicatorView(isVisible: $showLoadingIndicator, type: .rotatingDots())
|
||||
.frame(width: size, height: size)
|
||||
.foregroundColor(.red)
|
||||
ActivityIndicatorView(isVisible: $showLoadingIndicator, type: .equalizer())
|
||||
.frame(width: size, height: size)
|
||||
.foregroundColor(.red)
|
||||
ActivityIndicatorView(isVisible: $showLoadingIndicator, type: .growingArc(.red))
|
||||
.frame(width: size, height: size)
|
||||
.foregroundColor(.red)
|
||||
Spacer()
|
||||
}
|
||||
|
||||
Spacer()
|
||||
|
||||
VStack(spacing: spacing) {
|
||||
Spacer()
|
||||
ActivityIndicatorView(isVisible: $showLoadingIndicator, type: .opacityDots())
|
||||
.frame(width: size, height: size)
|
||||
.foregroundColor(.red)
|
||||
ActivityIndicatorView(isVisible: $showLoadingIndicator, type: .scalingDots())
|
||||
.frame(width: size, height: size)
|
||||
.foregroundColor(.red)
|
||||
ActivityIndicatorView(isVisible: $showLoadingIndicator, type: .gradient([Color.white, Color.red]))
|
||||
.frame(width: size, height: size)
|
||||
ActivityIndicatorView(isVisible: $showLoadingIndicator, type: .growingCircle)
|
||||
.frame(width: size, height: size)
|
||||
.foregroundColor(.red)
|
||||
ActivityIndicatorView(isVisible: $showLoadingIndicator, type: .flickeringDots())
|
||||
.frame(width: size, height: size)
|
||||
.foregroundColor(.red)
|
||||
Spacer()
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct ContentView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
ContentView()
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user