From a10835cd26aa025038e3293eda73dcb27217c809 Mon Sep 17 00:00:00 2001 From: Ishaan Mathur Date: Sun, 7 Jan 2024 22:19:37 -0600 Subject: [PATCH] modified layout --- HackIllinois/SwiftUI/HIOnboardingView.swift | 7 +++++-- HackIllinois/SwiftUI/UI/HICarouselSwiftUIView.swift | 11 +++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/HackIllinois/SwiftUI/HIOnboardingView.swift b/HackIllinois/SwiftUI/HIOnboardingView.swift index 32deb347..f017d259 100644 --- a/HackIllinois/SwiftUI/HIOnboardingView.swift +++ b/HackIllinois/SwiftUI/HIOnboardingView.swift @@ -29,7 +29,6 @@ struct HIOnboardingView: View { } } else { VStack { - Spacer() HICarouselSwiftUIView(carouselData: viewModel.data) Button { NotificationCenter.default.post(name: .getStarted, object: nil) @@ -37,6 +36,9 @@ struct HIOnboardingView: View { Text("GET STARTED") .font(.title2.bold()) .tracking(2) +// .onAppear { +// print("The screen height is \(UIScreen.main.bounds.height)") +// } } .padding() .font(.title3.bold()) @@ -45,7 +47,8 @@ struct HIOnboardingView: View { .background(Color.clear) .overlay(RoundedRectangle(cornerRadius: 50) .stroke(.white, lineWidth: 3)) - .offset(y: -70) + .padding(.top, 20) + .padding(.bottom, UIScreen.main.bounds.height < 750 ? 10 : 75) Spacer() } } diff --git a/HackIllinois/SwiftUI/UI/HICarouselSwiftUIView.swift b/HackIllinois/SwiftUI/UI/HICarouselSwiftUIView.swift index 8221d5f5..9dea11ef 100644 --- a/HackIllinois/SwiftUI/UI/HICarouselSwiftUIView.swift +++ b/HackIllinois/SwiftUI/UI/HICarouselSwiftUIView.swift @@ -7,7 +7,7 @@ // This file is part of the Hackillinois iOS App. // The Hackillinois iOS App is open source software, released under the University of // Illinois/NCSA Open Source License. You should have received a copy of -// this license in a file with the distribution. +// this license in a file with the distribution. // import Foundation @@ -24,23 +24,23 @@ struct HICarouselSwiftUIView: View { @State private var currentIndex = 0 var body: some View { VStack { + Spacer() TabView(selection: $currentIndex) { ForEach(0..