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

Commit

Permalink
Fix view problems on small screen sizes (#417)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippzagar authored Mar 16, 2022
1 parent ad35332 commit 1dff693
Showing 1 changed file with 31 additions and 28 deletions.
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

0 comments on commit 1dff693

Please sign in to comment.