Skip to content

Commit

Permalink
Loading and LogoViews
Browse files Browse the repository at this point in the history
  • Loading branch information
BPerlakiH committed Sep 14, 2024
1 parent 88ca86c commit 1f98231
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
29 changes: 28 additions & 1 deletion Views/BuildingBlocks/LoadingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

import SwiftUI

struct LoadingView: View {
struct LogoView: View {
var body: some View {
GeometryReader { geometry in
Image("kiwix-full")
Expand All @@ -29,6 +29,33 @@ struct LoadingView: View {
}
}

struct LoadingProgressView: View {
var body: some View {
GeometryReader { geometry in
ProgressView()
.progressViewStyle(.circular)
.tint(Color.primary)
.frame(
width: geometry.size.width * 0.618,
height: geometry.size.height * 0.191
)
.position(
x: geometry.size.width * 0.5,
y: geometry.size.height * 0.809
)
}
}
}

struct LoadingView: View {
var body: some View {
ZStack {
LogoView()
LoadingProgressView()
}.ignoresSafeArea()
}
}

#Preview {
LoadingView()
}
4 changes: 3 additions & 1 deletion Views/Welcome.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ struct Welcome: View {

var body: some View {
if zimFiles.isEmpty {
LoadingView().ignoresSafeArea()
ZStack {
LogoView()
}.ignoresSafeArea()
// ZStack {
// LoadingView()
// HStack {
Expand Down

0 comments on commit 1f98231

Please sign in to comment.