From 2d3a6f91d26abd404c14f814c674af8eac12006a Mon Sep 17 00:00:00 2001 From: Caitlyn Jin Date: Sun, 11 Feb 2024 18:34:07 -0500 Subject: [PATCH 1/6] Made fitness center images stretchy headers --- Uplift.xcodeproj/project.pbxproj | 4 ++ .../xcshareddata/swiftpm/Package.resolved | 20 +++++----- Uplift/Utils/Custom/StretchyModifier.swift | 37 +++++++++++++++++++ Uplift/Views/Home/GymDetailView.swift | 18 +++++---- 4 files changed, 61 insertions(+), 18 deletions(-) create mode 100644 Uplift/Utils/Custom/StretchyModifier.swift diff --git a/Uplift.xcodeproj/project.pbxproj b/Uplift.xcodeproj/project.pbxproj index 4a34b95..1fd6799 100644 --- a/Uplift.xcodeproj/project.pbxproj +++ b/Uplift.xcodeproj/project.pbxproj @@ -72,6 +72,7 @@ 2EE5F3E42B12EDB6008E0299 /* ApolloAPI in Frameworks */ = {isa = PBXBuildFile; productRef = 2EE5F3E32B12EDB6008E0299 /* ApolloAPI */; }; 2EF1A2582B129EEB007A299F /* Network.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2EF1A2572B129EEB007A299F /* Network.swift */; }; 842FB0CCD71C3202DE5836F1 /* Pods_Uplift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E86AC23F1B9AFB11552390BF /* Pods_Uplift.framework */; }; + 89ECDA892B79885C0006A160 /* StretchyModifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89ECDA882B79885C0006A160 /* StretchyModifier.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -145,6 +146,7 @@ 2EE5F3C92B12E34D008E0299 /* Apollo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Apollo.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 2EF1A2572B129EEB007A299F /* Network.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Network.swift; sourceTree = ""; }; 61B508C772C15943F0FDB2E8 /* Pods-Uplift.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Uplift.debug.xcconfig"; path = "Target Support Files/Pods-Uplift/Pods-Uplift.debug.xcconfig"; sourceTree = ""; }; + 89ECDA882B79885C0006A160 /* StretchyModifier.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StretchyModifier.swift; sourceTree = ""; }; D6EB08EC41E957E55D918532 /* Pods-Uplift.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Uplift.release.xcconfig"; path = "Target Support Files/Pods-Uplift/Pods-Uplift.release.xcconfig"; sourceTree = ""; }; E86AC23F1B9AFB11552390BF /* Pods_Uplift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Uplift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -333,6 +335,7 @@ 2E6785BD2B3A513000DD3ADA /* SemiCircleShape.swift */, 2E15F5012B396EC500414BEC /* ShadowModifier.swift */, 2E5726C62B4A63AE00D3DB36 /* ShimmerModifier.swift */, + 89ECDA882B79885C0006A160 /* StretchyModifier.swift */, 2E15F5112B3A3D0000414BEC /* TriangleShape.swift */, ); path = Custom; @@ -670,6 +673,7 @@ 2E090EC52B12EF2600BAE982 /* Publishers.swift in Sources */, 2E39D8222B3B631200AD238B /* DividerLine.swift in Sources */, 2E15F5062B39F81B00414BEC /* MainView.swift in Sources */, + 89ECDA892B79885C0006A160 /* StretchyModifier.swift in Sources */, 2E39D82A2B3B9F3D00AD238B /* FacilityExpandedView.swift in Sources */, 2E39D82C2B3BB35000AD238B /* FacilityExpandedViewModel.swift in Sources */, 2E3D6C202B1285D200B51BB2 /* UpliftEnvironment.swift in Sources */, diff --git a/Uplift.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Uplift.xcworkspace/xcshareddata/swiftpm/Package.resolved index 298d86b..267bac9 100644 --- a/Uplift.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Uplift.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -14,8 +14,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apollographql/apollo-ios.git", "state" : { - "revision" : "ff54632b8740ecfb858bae4630d822e615c7ef1c", - "version" : "1.8.0" + "revision" : "7e28eb75e9970edaba346a3c1eab1f8fc479a04d", + "version" : "1.7.1" } }, { @@ -23,8 +23,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/google/app-check.git", "state" : { - "revision" : "3e464dad87dad2d29bb29a97836789bf0f8f67d2", - "version" : "10.18.1" + "revision" : "5746b2d35c91c50581590ed97abe4c06b5037274", + "version" : "10.18.0" } }, { @@ -41,8 +41,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/firebase/firebase-ios-sdk", "state" : { - "revision" : "b880ec8ec927a838c51c12862c6222c30d7097d7", - "version" : "10.20.0" + "revision" : "c60c958e707c50a9cf8bcb7cfd7d51c566d726c5", + "version" : "10.19.1" } }, { @@ -50,8 +50,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/google/GoogleAppMeasurement.git", "state" : { - "revision" : "ceec9f28dea12b7cf3dabf18b5ed7621c88fd4aa", - "version" : "10.20.0" + "revision" : "6b332152355c372ace9966d8ee76ed191f97025e", + "version" : "10.17.0" } }, { @@ -104,8 +104,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/onevcat/Kingfisher", "state" : { - "revision" : "3ec0ab0bca4feb56e8b33e289c9496e89059dd08", - "version" : "7.10.2" + "revision" : "add0a87ec4e31e2ca2a0b2085f0559201e4f5918", + "version" : "7.10.1" } }, { diff --git a/Uplift/Utils/Custom/StretchyModifier.swift b/Uplift/Utils/Custom/StretchyModifier.swift new file mode 100644 index 0000000..8af1825 --- /dev/null +++ b/Uplift/Utils/Custom/StretchyModifier.swift @@ -0,0 +1,37 @@ +// +// StretchyHeaderModifier.swift +// Uplift +// +// Created by Caitlyn Jin on 2/11/24. +// Copyright © 2024 Cornell AppDev. All rights reserved. +// + +import SwiftUI + +/// A view modifier that applies a stretchy effect to the header image. +struct StretchyModifier: ViewModifier { + + var geometryProxy: GeometryProxy + + func body(content: Content) -> some View { + let minY = geometryProxy.frame(in: .global).minY + let originY = geometryProxy.frame(in: .global).origin.y + let height = geometryProxy.size.height + + content + .frame(height: minY > 0 ? height + originY : height) + .clipped() + .offset(y: minY > 0 ? -minY : 0) + } + +} + +extension View { + + @ViewBuilder + func stretchy(_ gp: GeometryProxy) -> some View { + self + .modifier(StretchyModifier(geometryProxy: gp)) + } + +} diff --git a/Uplift/Views/Home/GymDetailView.swift b/Uplift/Views/Home/GymDetailView.swift index 4c71871..675479a 100644 --- a/Uplift/Views/Home/GymDetailView.swift +++ b/Uplift/Views/Home/GymDetailView.swift @@ -81,14 +81,16 @@ struct GymDetailView: View { @MainActor private var heroSection: some View { ZStack(alignment: .center) { - KFImage(gym.imageUrl) - .placeholder { - Constants.Colors.gray01 - } - .resizable() - .scaledToFill() - .frame(height: 330) - .clipped() + GeometryReader { geometryProxy in + KFImage(gym.imageUrl) + .placeholder { + Constants.Colors.gray01 + } + .resizable() + .aspectRatio(contentMode: .fill) + .stretchy(geometryProxy) + } + .frame(height: 330) if viewModel.showHours { hoursView From 1b57c2396c1204f0ed8fe834ed5e9384ee68a17d Mon Sep 17 00:00:00 2001 From: Caitlyn Jin Date: Sun, 11 Feb 2024 18:34:07 -0500 Subject: [PATCH 2/6] Modified gym images as stretchy headers --- Uplift.xcodeproj/project.pbxproj | 4 ++ .../xcshareddata/swiftpm/Package.resolved | 20 +++++----- Uplift/Utils/Custom/StretchyModifier.swift | 37 +++++++++++++++++++ Uplift/Views/Home/GymDetailView.swift | 18 +++++---- 4 files changed, 61 insertions(+), 18 deletions(-) create mode 100644 Uplift/Utils/Custom/StretchyModifier.swift diff --git a/Uplift.xcodeproj/project.pbxproj b/Uplift.xcodeproj/project.pbxproj index 4a34b95..1fd6799 100644 --- a/Uplift.xcodeproj/project.pbxproj +++ b/Uplift.xcodeproj/project.pbxproj @@ -72,6 +72,7 @@ 2EE5F3E42B12EDB6008E0299 /* ApolloAPI in Frameworks */ = {isa = PBXBuildFile; productRef = 2EE5F3E32B12EDB6008E0299 /* ApolloAPI */; }; 2EF1A2582B129EEB007A299F /* Network.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2EF1A2572B129EEB007A299F /* Network.swift */; }; 842FB0CCD71C3202DE5836F1 /* Pods_Uplift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E86AC23F1B9AFB11552390BF /* Pods_Uplift.framework */; }; + 89ECDA892B79885C0006A160 /* StretchyModifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89ECDA882B79885C0006A160 /* StretchyModifier.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -145,6 +146,7 @@ 2EE5F3C92B12E34D008E0299 /* Apollo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Apollo.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 2EF1A2572B129EEB007A299F /* Network.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Network.swift; sourceTree = ""; }; 61B508C772C15943F0FDB2E8 /* Pods-Uplift.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Uplift.debug.xcconfig"; path = "Target Support Files/Pods-Uplift/Pods-Uplift.debug.xcconfig"; sourceTree = ""; }; + 89ECDA882B79885C0006A160 /* StretchyModifier.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StretchyModifier.swift; sourceTree = ""; }; D6EB08EC41E957E55D918532 /* Pods-Uplift.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Uplift.release.xcconfig"; path = "Target Support Files/Pods-Uplift/Pods-Uplift.release.xcconfig"; sourceTree = ""; }; E86AC23F1B9AFB11552390BF /* Pods_Uplift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Uplift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -333,6 +335,7 @@ 2E6785BD2B3A513000DD3ADA /* SemiCircleShape.swift */, 2E15F5012B396EC500414BEC /* ShadowModifier.swift */, 2E5726C62B4A63AE00D3DB36 /* ShimmerModifier.swift */, + 89ECDA882B79885C0006A160 /* StretchyModifier.swift */, 2E15F5112B3A3D0000414BEC /* TriangleShape.swift */, ); path = Custom; @@ -670,6 +673,7 @@ 2E090EC52B12EF2600BAE982 /* Publishers.swift in Sources */, 2E39D8222B3B631200AD238B /* DividerLine.swift in Sources */, 2E15F5062B39F81B00414BEC /* MainView.swift in Sources */, + 89ECDA892B79885C0006A160 /* StretchyModifier.swift in Sources */, 2E39D82A2B3B9F3D00AD238B /* FacilityExpandedView.swift in Sources */, 2E39D82C2B3BB35000AD238B /* FacilityExpandedViewModel.swift in Sources */, 2E3D6C202B1285D200B51BB2 /* UpliftEnvironment.swift in Sources */, diff --git a/Uplift.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Uplift.xcworkspace/xcshareddata/swiftpm/Package.resolved index 298d86b..267bac9 100644 --- a/Uplift.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Uplift.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -14,8 +14,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apollographql/apollo-ios.git", "state" : { - "revision" : "ff54632b8740ecfb858bae4630d822e615c7ef1c", - "version" : "1.8.0" + "revision" : "7e28eb75e9970edaba346a3c1eab1f8fc479a04d", + "version" : "1.7.1" } }, { @@ -23,8 +23,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/google/app-check.git", "state" : { - "revision" : "3e464dad87dad2d29bb29a97836789bf0f8f67d2", - "version" : "10.18.1" + "revision" : "5746b2d35c91c50581590ed97abe4c06b5037274", + "version" : "10.18.0" } }, { @@ -41,8 +41,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/firebase/firebase-ios-sdk", "state" : { - "revision" : "b880ec8ec927a838c51c12862c6222c30d7097d7", - "version" : "10.20.0" + "revision" : "c60c958e707c50a9cf8bcb7cfd7d51c566d726c5", + "version" : "10.19.1" } }, { @@ -50,8 +50,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/google/GoogleAppMeasurement.git", "state" : { - "revision" : "ceec9f28dea12b7cf3dabf18b5ed7621c88fd4aa", - "version" : "10.20.0" + "revision" : "6b332152355c372ace9966d8ee76ed191f97025e", + "version" : "10.17.0" } }, { @@ -104,8 +104,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/onevcat/Kingfisher", "state" : { - "revision" : "3ec0ab0bca4feb56e8b33e289c9496e89059dd08", - "version" : "7.10.2" + "revision" : "add0a87ec4e31e2ca2a0b2085f0559201e4f5918", + "version" : "7.10.1" } }, { diff --git a/Uplift/Utils/Custom/StretchyModifier.swift b/Uplift/Utils/Custom/StretchyModifier.swift new file mode 100644 index 0000000..8af1825 --- /dev/null +++ b/Uplift/Utils/Custom/StretchyModifier.swift @@ -0,0 +1,37 @@ +// +// StretchyHeaderModifier.swift +// Uplift +// +// Created by Caitlyn Jin on 2/11/24. +// Copyright © 2024 Cornell AppDev. All rights reserved. +// + +import SwiftUI + +/// A view modifier that applies a stretchy effect to the header image. +struct StretchyModifier: ViewModifier { + + var geometryProxy: GeometryProxy + + func body(content: Content) -> some View { + let minY = geometryProxy.frame(in: .global).minY + let originY = geometryProxy.frame(in: .global).origin.y + let height = geometryProxy.size.height + + content + .frame(height: minY > 0 ? height + originY : height) + .clipped() + .offset(y: minY > 0 ? -minY : 0) + } + +} + +extension View { + + @ViewBuilder + func stretchy(_ gp: GeometryProxy) -> some View { + self + .modifier(StretchyModifier(geometryProxy: gp)) + } + +} diff --git a/Uplift/Views/Home/GymDetailView.swift b/Uplift/Views/Home/GymDetailView.swift index 4c71871..675479a 100644 --- a/Uplift/Views/Home/GymDetailView.swift +++ b/Uplift/Views/Home/GymDetailView.swift @@ -81,14 +81,16 @@ struct GymDetailView: View { @MainActor private var heroSection: some View { ZStack(alignment: .center) { - KFImage(gym.imageUrl) - .placeholder { - Constants.Colors.gray01 - } - .resizable() - .scaledToFill() - .frame(height: 330) - .clipped() + GeometryReader { geometryProxy in + KFImage(gym.imageUrl) + .placeholder { + Constants.Colors.gray01 + } + .resizable() + .aspectRatio(contentMode: .fill) + .stretchy(geometryProxy) + } + .frame(height: 330) if viewModel.showHours { hoursView From ae2f5f93d1289172982be736f76e2b1924b31a86 Mon Sep 17 00:00:00 2001 From: Caitlyn Jin Date: Sun, 25 Feb 2024 21:46:00 -0500 Subject: [PATCH 3/6] Update Package.resolved --- .../xcshareddata/swiftpm/Package.resolved | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Uplift.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Uplift.xcworkspace/xcshareddata/swiftpm/Package.resolved index 267bac9..298d86b 100644 --- a/Uplift.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Uplift.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -14,8 +14,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apollographql/apollo-ios.git", "state" : { - "revision" : "7e28eb75e9970edaba346a3c1eab1f8fc479a04d", - "version" : "1.7.1" + "revision" : "ff54632b8740ecfb858bae4630d822e615c7ef1c", + "version" : "1.8.0" } }, { @@ -23,8 +23,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/google/app-check.git", "state" : { - "revision" : "5746b2d35c91c50581590ed97abe4c06b5037274", - "version" : "10.18.0" + "revision" : "3e464dad87dad2d29bb29a97836789bf0f8f67d2", + "version" : "10.18.1" } }, { @@ -41,8 +41,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/firebase/firebase-ios-sdk", "state" : { - "revision" : "c60c958e707c50a9cf8bcb7cfd7d51c566d726c5", - "version" : "10.19.1" + "revision" : "b880ec8ec927a838c51c12862c6222c30d7097d7", + "version" : "10.20.0" } }, { @@ -50,8 +50,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/google/GoogleAppMeasurement.git", "state" : { - "revision" : "6b332152355c372ace9966d8ee76ed191f97025e", - "version" : "10.17.0" + "revision" : "ceec9f28dea12b7cf3dabf18b5ed7621c88fd4aa", + "version" : "10.20.0" } }, { @@ -104,8 +104,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/onevcat/Kingfisher", "state" : { - "revision" : "add0a87ec4e31e2ca2a0b2085f0559201e4f5918", - "version" : "7.10.1" + "revision" : "3ec0ab0bca4feb56e8b33e289c9496e89059dd08", + "version" : "7.10.2" } }, { From c3b33010beb802535bd2d040eae40e16fa9a471b Mon Sep 17 00:00:00 2001 From: Caitlyn Jin Date: Wed, 6 Mar 2024 14:27:13 -0500 Subject: [PATCH 4/6] Addressed Vin's comments - Renamed geometry proxy --- Uplift.xcodeproj/project.pbxproj | 8 ++++---- .../xcshareddata/swiftpm/Package.resolved | 3 ++- Uplift/Utils/Custom/StretchyModifier.swift | 12 ++++++------ Uplift/Views/Home/GymDetailView.swift | 4 ++-- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/Uplift.xcodeproj/project.pbxproj b/Uplift.xcodeproj/project.pbxproj index 2b6fdd9..bd0f906 100644 --- a/Uplift.xcodeproj/project.pbxproj +++ b/Uplift.xcodeproj/project.pbxproj @@ -72,8 +72,8 @@ 2EE5F3E42B12EDB6008E0299 /* ApolloAPI in Frameworks */ = {isa = PBXBuildFile; productRef = 2EE5F3E32B12EDB6008E0299 /* ApolloAPI */; }; 2EF1A2582B129EEB007A299F /* Network.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2EF1A2572B129EEB007A299F /* Network.swift */; }; 842FB0CCD71C3202DE5836F1 /* Pods_Uplift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E86AC23F1B9AFB11552390BF /* Pods_Uplift.framework */; }; - 89ECDA892B79885C0006A160 /* StretchyModifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89ECDA882B79885C0006A160 /* StretchyModifier.swift */; }; 89921C392B8A98BA00364400 /* HomeGymCellViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89921C382B8A98BA00364400 /* HomeGymCellViewModel.swift */; }; + 89ECDA892B79885C0006A160 /* StretchyModifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89ECDA882B79885C0006A160 /* StretchyModifier.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -147,8 +147,8 @@ 2EE5F3C92B12E34D008E0299 /* Apollo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Apollo.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 2EF1A2572B129EEB007A299F /* Network.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Network.swift; sourceTree = ""; }; 61B508C772C15943F0FDB2E8 /* Pods-Uplift.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Uplift.debug.xcconfig"; path = "Target Support Files/Pods-Uplift/Pods-Uplift.debug.xcconfig"; sourceTree = ""; }; - 89ECDA882B79885C0006A160 /* StretchyModifier.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StretchyModifier.swift; sourceTree = ""; }; 89921C382B8A98BA00364400 /* HomeGymCellViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeGymCellViewModel.swift; sourceTree = ""; }; + 89ECDA882B79885C0006A160 /* StretchyModifier.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StretchyModifier.swift; sourceTree = ""; }; D6EB08EC41E957E55D918532 /* Pods-Uplift.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Uplift.release.xcconfig"; path = "Target Support Files/Pods-Uplift/Pods-Uplift.release.xcconfig"; sourceTree = ""; }; E86AC23F1B9AFB11552390BF /* Pods_Uplift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Uplift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -517,9 +517,9 @@ 2EE5F3E02B12EDB6008E0299 /* XCRemoteSwiftPackageReference "apollo-ios" */, 2E6785BA2B3A48D700DD3ADA /* XCRemoteSwiftPackageReference "WrappingHStack" */, 2EC3EE642B3C000E00E927BF /* XCRemoteSwiftPackageReference "Kingfisher" */, - 2E4F06DA2B4B48DC008905C8 /* XCLocalSwiftPackageReference "UpliftAPI" */, 2E45B23E2B4E361100FB83B7 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */, 2EE5D6512B65E7DC004BB8F5 /* XCRemoteSwiftPackageReference "appdev-announcements" */, + 89950D872B98F92800DFB007 /* XCLocalSwiftPackageReference "UpliftAPI" */, ); productRefGroup = 2E8FE38D2B1278B700B3DC6A /* Products */; projectDirPath = ""; @@ -999,7 +999,7 @@ /* End XCConfigurationList section */ /* Begin XCLocalSwiftPackageReference section */ - 2E4F06DA2B4B48DC008905C8 /* XCLocalSwiftPackageReference "UpliftAPI" */ = { + 89950D872B98F92800DFB007 /* XCLocalSwiftPackageReference "UpliftAPI" */ = { isa = XCLocalSwiftPackageReference; relativePath = UpliftAPI; }; diff --git a/Uplift.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Uplift.xcworkspace/xcshareddata/swiftpm/Package.resolved index 298d86b..433e9cb 100644 --- a/Uplift.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Uplift.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,4 +1,5 @@ { + "originHash" : "4b9b3950fbe6da2fe6e272e05e7838a9e224fb88becd3ddc341ab9714f0b8c6d", "pins" : [ { "identity" : "abseil-cpp-binary", @@ -163,5 +164,5 @@ } } ], - "version" : 2 + "version" : 3 } diff --git a/Uplift/Utils/Custom/StretchyModifier.swift b/Uplift/Utils/Custom/StretchyModifier.swift index 8af1825..e4eac2d 100644 --- a/Uplift/Utils/Custom/StretchyModifier.swift +++ b/Uplift/Utils/Custom/StretchyModifier.swift @@ -11,12 +11,12 @@ import SwiftUI /// A view modifier that applies a stretchy effect to the header image. struct StretchyModifier: ViewModifier { - var geometryProxy: GeometryProxy + var geometry: GeometryProxy func body(content: Content) -> some View { - let minY = geometryProxy.frame(in: .global).minY - let originY = geometryProxy.frame(in: .global).origin.y - let height = geometryProxy.size.height + let minY = geometry.frame(in: .global).minY + let originY = geometry.frame(in: .global).origin.y + let height = geometry.size.height content .frame(height: minY > 0 ? height + originY : height) @@ -29,9 +29,9 @@ struct StretchyModifier: ViewModifier { extension View { @ViewBuilder - func stretchy(_ gp: GeometryProxy) -> some View { + func stretchy(_ geometry: GeometryProxy) -> some View { self - .modifier(StretchyModifier(geometryProxy: gp)) + .modifier(StretchyModifier(geometry: geometry)) } } diff --git a/Uplift/Views/Home/GymDetailView.swift b/Uplift/Views/Home/GymDetailView.swift index b866b8f..b932af9 100644 --- a/Uplift/Views/Home/GymDetailView.swift +++ b/Uplift/Views/Home/GymDetailView.swift @@ -81,14 +81,14 @@ struct GymDetailView: View { @MainActor private var heroSection: some View { ZStack(alignment: .center) { - GeometryReader { geometryProxy in + GeometryReader { geometry in KFImage(gym.imageUrl) .placeholder { Constants.Colors.gray01 } .resizable() .aspectRatio(contentMode: .fill) - .stretchy(geometryProxy) + .stretchy(geometry) } .frame(height: 330) From 5e71ee1cd58bb8a4133a7e6c779989815566e285 Mon Sep 17 00:00:00 2001 From: Caitlyn Jin Date: Sun, 10 Mar 2024 00:20:05 -0500 Subject: [PATCH 5/6] Addressed Vin's comments - Fixed naming error --- .../xcshareddata/swiftpm/Package.resolved | 168 ------------------ Uplift/Utils/Custom/StretchyModifier.swift | 2 +- 2 files changed, 1 insertion(+), 169 deletions(-) delete mode 100644 Uplift.xcworkspace/xcshareddata/swiftpm/Package.resolved diff --git a/Uplift.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Uplift.xcworkspace/xcshareddata/swiftpm/Package.resolved deleted file mode 100644 index 433e9cb..0000000 --- a/Uplift.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ /dev/null @@ -1,168 +0,0 @@ -{ - "originHash" : "4b9b3950fbe6da2fe6e272e05e7838a9e224fb88becd3ddc341ab9714f0b8c6d", - "pins" : [ - { - "identity" : "abseil-cpp-binary", - "kind" : "remoteSourceControl", - "location" : "https://github.com/google/abseil-cpp-binary.git", - "state" : { - "revision" : "bfc0b6f81adc06ce5121eb23f628473638d67c5c", - "version" : "1.2022062300.0" - } - }, - { - "identity" : "apollo-ios", - "kind" : "remoteSourceControl", - "location" : "https://github.com/apollographql/apollo-ios.git", - "state" : { - "revision" : "ff54632b8740ecfb858bae4630d822e615c7ef1c", - "version" : "1.8.0" - } - }, - { - "identity" : "app-check", - "kind" : "remoteSourceControl", - "location" : "https://github.com/google/app-check.git", - "state" : { - "revision" : "3e464dad87dad2d29bb29a97836789bf0f8f67d2", - "version" : "10.18.1" - } - }, - { - "identity" : "appdev-announcements", - "kind" : "remoteSourceControl", - "location" : "https://github.com/cuappdev/appdev-announcements", - "state" : { - "branch" : "master", - "revision" : "13a490d0982b02f489c7a76e3f03248de4c08e2c" - } - }, - { - "identity" : "firebase-ios-sdk", - "kind" : "remoteSourceControl", - "location" : "https://github.com/firebase/firebase-ios-sdk", - "state" : { - "revision" : "b880ec8ec927a838c51c12862c6222c30d7097d7", - "version" : "10.20.0" - } - }, - { - "identity" : "googleappmeasurement", - "kind" : "remoteSourceControl", - "location" : "https://github.com/google/GoogleAppMeasurement.git", - "state" : { - "revision" : "ceec9f28dea12b7cf3dabf18b5ed7621c88fd4aa", - "version" : "10.20.0" - } - }, - { - "identity" : "googledatatransport", - "kind" : "remoteSourceControl", - "location" : "https://github.com/google/GoogleDataTransport.git", - "state" : { - "revision" : "a732a4b47f59e4f725a2ea10f0c77e93a7131117", - "version" : "9.3.0" - } - }, - { - "identity" : "googleutilities", - "kind" : "remoteSourceControl", - "location" : "https://github.com/google/GoogleUtilities.git", - "state" : { - "revision" : "bc27fad73504f3d4af235de451f02ee22586ebd3", - "version" : "7.12.1" - } - }, - { - "identity" : "grpc-binary", - "kind" : "remoteSourceControl", - "location" : "https://github.com/google/grpc-binary.git", - "state" : { - "revision" : "a673bc2937fbe886dd1f99c401b01b6d977a9c98", - "version" : "1.49.1" - } - }, - { - "identity" : "gtm-session-fetcher", - "kind" : "remoteSourceControl", - "location" : "https://github.com/google/gtm-session-fetcher.git", - "state" : { - "revision" : "115f75e43851774934d695449a4836123c3246e1", - "version" : "3.2.0" - } - }, - { - "identity" : "interop-ios-for-google-sdks", - "kind" : "remoteSourceControl", - "location" : "https://github.com/google/interop-ios-for-google-sdks.git", - "state" : { - "revision" : "2d12673670417654f08f5f90fdd62926dc3a2648", - "version" : "100.0.0" - } - }, - { - "identity" : "kingfisher", - "kind" : "remoteSourceControl", - "location" : "https://github.com/onevcat/Kingfisher", - "state" : { - "revision" : "3ec0ab0bca4feb56e8b33e289c9496e89059dd08", - "version" : "7.10.2" - } - }, - { - "identity" : "leveldb", - "kind" : "remoteSourceControl", - "location" : "https://github.com/firebase/leveldb.git", - "state" : { - "revision" : "9d108e9112aa1d65ce508facf804674546116d9c", - "version" : "1.22.3" - } - }, - { - "identity" : "nanopb", - "kind" : "remoteSourceControl", - "location" : "https://github.com/firebase/nanopb.git", - "state" : { - "revision" : "819d0a2173aff699fb8c364b6fb906f7cdb1a692", - "version" : "2.30909.0" - } - }, - { - "identity" : "promises", - "kind" : "remoteSourceControl", - "location" : "https://github.com/google/promises.git", - "state" : { - "revision" : "e70e889c0196c76d22759eb50d6a0270ca9f1d9e", - "version" : "2.3.1" - } - }, - { - "identity" : "sqlite.swift", - "kind" : "remoteSourceControl", - "location" : "https://github.com/stephencelis/SQLite.swift.git", - "state" : { - "revision" : "7a2e3cd27de56f6d396e84f63beefd0267b55ccb", - "version" : "0.14.1" - } - }, - { - "identity" : "swift-protobuf", - "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-protobuf.git", - "state" : { - "revision" : "65e8f29b2d63c4e38e736b25c27b83e012159be8", - "version" : "1.25.2" - } - }, - { - "identity" : "wrappinghstack", - "kind" : "remoteSourceControl", - "location" : "https://github.com/dkk/WrappingHStack", - "state" : { - "revision" : "425d9488ba55f58f0b34498c64c054c77fc2a44b", - "version" : "2.2.11" - } - } - ], - "version" : 3 -} diff --git a/Uplift/Utils/Custom/StretchyModifier.swift b/Uplift/Utils/Custom/StretchyModifier.swift index e4eac2d..14ce012 100644 --- a/Uplift/Utils/Custom/StretchyModifier.swift +++ b/Uplift/Utils/Custom/StretchyModifier.swift @@ -1,5 +1,5 @@ // -// StretchyHeaderModifier.swift +// StretchyModifier.swift // Uplift // // Created by Caitlyn Jin on 2/11/24. From 6932478c5ac88c45c767cbf05bcf96214d178a0e Mon Sep 17 00:00:00 2001 From: Caitlyn Jin Date: Tue, 12 Mar 2024 00:09:14 -0400 Subject: [PATCH 6/6] Create Package.resolved --- .../xcshareddata/swiftpm/Package.resolved | 168 ++++++++++++++++++ 1 file changed, 168 insertions(+) create mode 100644 Uplift.xcworkspace/xcshareddata/swiftpm/Package.resolved diff --git a/Uplift.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Uplift.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 0000000..7fb3b7d --- /dev/null +++ b/Uplift.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,168 @@ +{ + "originHash" : "cdc8655ffc7ebbb23650b448b043f956af2b54256b14a7272467b60f2aaa9eef", + "pins" : [ + { + "identity" : "abseil-cpp-binary", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/abseil-cpp-binary.git", + "state" : { + "revision" : "bfc0b6f81adc06ce5121eb23f628473638d67c5c", + "version" : "1.2022062300.0" + } + }, + { + "identity" : "apollo-ios", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apollographql/apollo-ios.git", + "state" : { + "revision" : "ff54632b8740ecfb858bae4630d822e615c7ef1c", + "version" : "1.8.0" + } + }, + { + "identity" : "app-check", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/app-check.git", + "state" : { + "revision" : "3e464dad87dad2d29bb29a97836789bf0f8f67d2", + "version" : "10.18.1" + } + }, + { + "identity" : "appdev-announcements", + "kind" : "remoteSourceControl", + "location" : "https://github.com/cuappdev/appdev-announcements", + "state" : { + "branch" : "master", + "revision" : "13a490d0982b02f489c7a76e3f03248de4c08e2c" + } + }, + { + "identity" : "firebase-ios-sdk", + "kind" : "remoteSourceControl", + "location" : "https://github.com/firebase/firebase-ios-sdk", + "state" : { + "revision" : "b880ec8ec927a838c51c12862c6222c30d7097d7", + "version" : "10.20.0" + } + }, + { + "identity" : "googleappmeasurement", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/GoogleAppMeasurement.git", + "state" : { + "revision" : "ceec9f28dea12b7cf3dabf18b5ed7621c88fd4aa", + "version" : "10.20.0" + } + }, + { + "identity" : "googledatatransport", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/GoogleDataTransport.git", + "state" : { + "revision" : "a732a4b47f59e4f725a2ea10f0c77e93a7131117", + "version" : "9.3.0" + } + }, + { + "identity" : "googleutilities", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/GoogleUtilities.git", + "state" : { + "revision" : "bc27fad73504f3d4af235de451f02ee22586ebd3", + "version" : "7.12.1" + } + }, + { + "identity" : "grpc-binary", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/grpc-binary.git", + "state" : { + "revision" : "a673bc2937fbe886dd1f99c401b01b6d977a9c98", + "version" : "1.49.1" + } + }, + { + "identity" : "gtm-session-fetcher", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/gtm-session-fetcher.git", + "state" : { + "revision" : "115f75e43851774934d695449a4836123c3246e1", + "version" : "3.2.0" + } + }, + { + "identity" : "interop-ios-for-google-sdks", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/interop-ios-for-google-sdks.git", + "state" : { + "revision" : "2d12673670417654f08f5f90fdd62926dc3a2648", + "version" : "100.0.0" + } + }, + { + "identity" : "kingfisher", + "kind" : "remoteSourceControl", + "location" : "https://github.com/onevcat/Kingfisher", + "state" : { + "revision" : "3ec0ab0bca4feb56e8b33e289c9496e89059dd08", + "version" : "7.10.2" + } + }, + { + "identity" : "leveldb", + "kind" : "remoteSourceControl", + "location" : "https://github.com/firebase/leveldb.git", + "state" : { + "revision" : "9d108e9112aa1d65ce508facf804674546116d9c", + "version" : "1.22.3" + } + }, + { + "identity" : "nanopb", + "kind" : "remoteSourceControl", + "location" : "https://github.com/firebase/nanopb.git", + "state" : { + "revision" : "819d0a2173aff699fb8c364b6fb906f7cdb1a692", + "version" : "2.30909.0" + } + }, + { + "identity" : "promises", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/promises.git", + "state" : { + "revision" : "e70e889c0196c76d22759eb50d6a0270ca9f1d9e", + "version" : "2.3.1" + } + }, + { + "identity" : "sqlite.swift", + "kind" : "remoteSourceControl", + "location" : "https://github.com/stephencelis/SQLite.swift.git", + "state" : { + "revision" : "7a2e3cd27de56f6d396e84f63beefd0267b55ccb", + "version" : "0.14.1" + } + }, + { + "identity" : "swift-protobuf", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-protobuf.git", + "state" : { + "revision" : "65e8f29b2d63c4e38e736b25c27b83e012159be8", + "version" : "1.25.2" + } + }, + { + "identity" : "wrappinghstack", + "kind" : "remoteSourceControl", + "location" : "https://github.com/dkk/WrappingHStack", + "state" : { + "revision" : "425d9488ba55f58f0b34498c64c054c77fc2a44b", + "version" : "2.2.11" + } + } + ], + "version" : 3 +}