Skip to content

Commit c443e97

Browse files
committed
Fix autolayout constraint with label on STPCardFormView
1 parent 672ec5e commit c443e97

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## x.x.x y-y-y
2+
### PaymentsUI
3+
* [Fixed] Fixed issue which could lead to STPCardFormView being collapsed with SwiftUI
4+
15
## 24.0.1 2024-11-18
26
### PaymentSheet
37
* [Added] Instant Bank Payments are now available when using deferred intents.

Example/UI Examples/UI Examples/Source/SwiftUICardFormView.swift

+2
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@ struct SwiftUICardFormView: View {
1616

1717
var body: some View {
1818
VStack {
19+
Spacer().layoutPriority(1)
1920
STPCardFormView.Representable(paymentMethodParams: $paymentMethodParams,
2021
isComplete: $cardFormIsComplete)
2122
.padding()
23+
Spacer().layoutPriority(1)
2224
Button(action: {
2325
print("Process payment...")
2426
}, label: {

StripePaymentsUI/StripePaymentsUI/Source/UI Components/STPFormView.swift

-1
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,6 @@ extension STPFormView {
652652
equalTo: stackView.bottomAnchor,
653653
constant: SectionView.titleVerticalMargin
654654
),
655-
bottomAnchor.constraint(equalTo: footerLabel.bottomAnchor),
656655
])
657656

658657
// the initial layout of a SectionView will log constraint errors if it has a row with multiple

0 commit comments

Comments
 (0)