another.im-ios/Monal/another.im/Views/SharedComponents/LoadingScreen.swift
2024-11-19 17:07:51 +01:00

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)))
}
}