-
Notifications
You must be signed in to change notification settings - Fork 290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Paywalls
: fix template 4 layout bug on iOS 16
#3381
Conversation
This only reproduces on iOS 16 + using the new `displayCloseButton: true` (because it embeds `PaywallView` in a `NavigationView`). The problem was that the template used `ViewDimentionPreferenceKey` in several parts of the hierarchy and `SwiftUI` mixes both. I work around it by separating `onWidthChange` and `onHeightChange`.
536f6a8
to
40ee848
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a question, but I'm not sure if that's possible. Looks good though
|
||
static var defaultValue: Value = 10 | ||
|
||
static func reduce(value: inout Value, nextValue: () -> Value) { | ||
static func reduce(value: inout CGFloat, nextValue: () -> CGFloat) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to move this static method to the protocol considering it's repeated between width and height?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
**This is an automatic release.** ### RevenueCatUI * `Paywalls`: fix Turkish discount string (#3385) via NachoSoto (@NachoSoto) * `Paywalls`: fix template 4 layout bug on iOS 16 (#3381) via NachoSoto (@NachoSoto) ### Dependency Updates * Bump fastlane-plugin-revenuecat_internal from `a297205` to `0ddee10` (#3383) via dependabot[bot] (@dependabot[bot]) ### Other Changes * `CircleCI`: fix `visionOS` job (#3384) via NachoSoto (@NachoSoto)
This only reproduces on iOS 16 and using the new
displayCloseButton: true
(because it embedsPaywallView
in aNavigationView
).The problem was that the template used
ViewDimentionPreferenceKey
in several parts of the hierarchy andSwiftUI
mixes both.I work around it by separating
onWidthChange
andonHeightChange
.