24 lines
757 B
Swift
24 lines
757 B
Swift
|
import SwiftUI
|
||
|
|
||
|
struct LoadingScreen: View {
|
||
|
var body: some View {
|
||
|
GeometryReader { geo in
|
||
|
ZStack {
|
||
|
// background with opacity
|
||
|
Color.Material.Elements.active.opacity(0.3)
|
||
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||
|
|
||
|
// loader
|
||
|
ProgressView()
|
||
|
.progressViewStyle(
|
||
|
CircularProgressViewStyle(tint: .Material.Elements.active)
|
||
|
)
|
||
|
.position(x: geo.size.width / 2, y: geo.size.height / 2)
|
||
|
.controlSize(.large)
|
||
|
}
|
||
|
}
|
||
|
.ignoresSafeArea()
|
||
|
.transition(AnyTransition.opacity.animation(.easeInOut(duration: 0.1)))
|
||
|
}
|
||
|
}
|