diff --git a/CHANGELOG.md b/CHANGELOG.md index ecaedcbb39d..af06ef56814 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## x.x.x y-y-y +### PaymentsUI +* [Fixed] Fixed issue which could lead to STPCardFormView being collapsed with SwiftUI + ## 24.0.1 2024-11-18 ### PaymentSheet * [Added] Instant Bank Payments are now available when using deferred intents. diff --git a/Example/UI Examples/UI Examples/Source/SwiftUICardFormView.swift b/Example/UI Examples/UI Examples/Source/SwiftUICardFormView.swift index f08823098bd..63f831dc875 100644 --- a/Example/UI Examples/UI Examples/Source/SwiftUICardFormView.swift +++ b/Example/UI Examples/UI Examples/Source/SwiftUICardFormView.swift @@ -16,9 +16,11 @@ struct SwiftUICardFormView: View { var body: some View { VStack { + Spacer().layoutPriority(1) STPCardFormView.Representable(paymentMethodParams: $paymentMethodParams, isComplete: $cardFormIsComplete) .padding() + Spacer().layoutPriority(1) Button(action: { print("Process payment...") }, label: { diff --git a/StripePaymentsUI/StripePaymentsUI/Source/UI Components/STPFormView.swift b/StripePaymentsUI/StripePaymentsUI/Source/UI Components/STPFormView.swift index 7e3e51e4483..b7599825a19 100644 --- a/StripePaymentsUI/StripePaymentsUI/Source/UI Components/STPFormView.swift +++ b/StripePaymentsUI/StripePaymentsUI/Source/UI Components/STPFormView.swift @@ -652,7 +652,6 @@ extension STPFormView { equalTo: stackView.bottomAnchor, constant: SectionView.titleVerticalMargin ), - bottomAnchor.constraint(equalTo: footerLabel.bottomAnchor), ]) // the initial layout of a SectionView will log constraint errors if it has a row with multiple