Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Fix view problems on small screen sizes #417

Merged
merged 1 commit into from
Mar 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 31 additions & 28 deletions Campus-iOS/Base/Views/FailedView.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// LoadingView.swift
// FailedView.swift
// Campus-iOS
//
// Created by Philipp Zagar on 21.12.21.
Expand All @@ -11,37 +11,40 @@ struct FailedView: View {
let errorDescription: String

var body: some View {
ZStack (alignment: Alignment(horizontal: .center, vertical: .bottom)) {
Image("Error-logo")
.resizable()
.aspectRatio(contentMode: .fill)
.edgesIgnoringSafeArea(.all)
VStack (alignment: .center, spacing: 30) {
Text("oh no!")
.font(.title)

Text("Someting went wrong.")
.multilineTextAlignment(.center)
.opacity(0.7)

Text("Error: \(errorDescription)")
.multilineTextAlignment(.center)
.opacity(0.7)

Button(action: {
VStack {
ZStack (alignment: Alignment(horizontal: .center, vertical: .bottom)) {
Image("Error-logo")
.resizable()
.aspectRatio(contentMode: .fill)
.edgesIgnoringSafeArea(.all)
VStack (alignment: .center, spacing: 12) {
Text("oh no!")
.font(.title)

}) {
Text("Try Again".uppercased())
.fontWeight(.semibold)
.foregroundColor(.white)
.padding(.vertical)
.padding(.horizontal, 30)
.background(Capsule().foregroundColor(Color("tumBlue")))
Text("Someting went wrong.")
.multilineTextAlignment(.center)
.opacity(0.7)

Text("Error: \(errorDescription)")
.multilineTextAlignment(.center)
.opacity(0.7)

Button(action: {

}) {
Text("Try Again".uppercased())
.fontWeight(.semibold)
.foregroundColor(.white)
.padding(.vertical)
.padding(.horizontal, 30)
.background(Capsule().foregroundColor(Color("tumBlue")))
}
}
.padding(.horizontal, 30)
.padding(.bottom, UIScreen.main.bounds.height * 0.1)
}
.padding(.horizontal, 70)
.padding(.bottom, UIScreen.main.bounds.height * 0.1)
}
.padding(.bottom, 60)
}
}

Expand Down