Skip to content

Commit

Permalink
Paywalls: fixed template 2 inconsistent spacing (#3091)
Browse files Browse the repository at this point in the history
  • Loading branch information
NachoSoto committed Aug 28, 2023
1 parent adb7578 commit ea83e37
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions RevenueCatUI/Templates/Template2View.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ struct Template2View: TemplateViewType {
@ViewBuilder
var content: some View {
VStack(spacing: self.defaultVerticalPaddingLength) {
Spacer()
// Avoid unnecessary spacing, except for iOS 15 because SwiftuI breaks the layout.
Spacer(minLength: VersionDetector.iOS15 ? nil : 0)

self.scrollableContent
.scrollableIfNecessary(enabled: self.configuration.mode.shouldDisplayPackages)
Expand Down Expand Up @@ -122,7 +123,7 @@ struct Template2View: TemplateViewType {
.buttonStyle(PackageButtonStyle(isSelected: isSelected))
}
}
.defaultHorizontalPadding()
.padding([.horizontal, .top], self.defaultHorizontalPaddingLength)

Spacer()
}
Expand Down

0 comments on commit ea83e37

Please sign in to comment.