-
Notifications
You must be signed in to change notification settings - Fork 295
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
: new PaywallViewControllerDelegate.paywallViewController(_:didChangeSizeTo:)
#3563
Conversation
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 couple of comments from our initial prototype implementations.
Also this needs to go into the API tester: https://github.com/RevenueCat/purchases-ios/blob/main/Tests/APITesters/RevenueCatUIAPITester/SwiftAPITester/PaywallViewControllerAPI.swift#L31
@objc(paywallViewControlleSizeDidChange:) | ||
optional func paywallViewControlleSizeDidChange(_ size: CGSize) |
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.
Let's add a doc to this and the sender controller like the others have:
@objc(paywallViewControlleSizeDidChange:) | |
optional func paywallViewControlleSizeDidChange(_ size: CGSize) | |
/// For internal use only. | |
@objc(paywallViewController:didChangeSize:) | |
optional func paywallViewController(_ controller: PaywallViewController, didChangeSize size: CGSize) |
.onSizeChange { [weak self] in | ||
self?.delegate?.paywallViewControlleSizeDidChange?($0) | ||
} |
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.
Then this becomes:
.onSizeChange { [weak self] in | |
self?.delegate?.paywallViewControlleSizeDidChange?($0) | |
} | |
.onSizeChange { [weak self] in | |
guard let self = self else { return } | |
self.delegate?.paywallViewController(self, didChangeSize: $0) | |
} |
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.
Should it be didChangeSizeWith
?
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.
Maybe didChangeSizeTo
?
Paywalls
: new PaywallViewControllerDelegate.paywallViewController(_:didChangeSize:)
method
Changed the label to |
Paywalls
: new PaywallViewControllerDelegate.paywallViewController(_:didChangeSize:)
methodPaywalls
: new PaywallViewControllerDelegate.paywallViewController(_:didChangeSize:)
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.
Looks great! After Nacho's comments are fixed will rereview.
Paywalls
: new PaywallViewControllerDelegate.paywallViewController(_:didChangeSize:)
Paywalls
: new PaywallViewControllerDelegate.paywallViewController(_:didChangeSizeTo:)
**This is an automatic release.** ### RevenueCatUI * `Paywalls`: remove unscrollable spacing in Template 5 (#3562) via NachoSoto (@NachoSoto) * `Paywalls`: improve template 5 checkmark icon (#3559) via NachoSoto (@NachoSoto) ### Bugfixes * Improve sandbox detector for macOS apps (#3549) via Mark Villacampa (@MarkVillacampa) ### Other Changes * `Paywalls`: new `PaywallViewControllerDelegate.paywallViewController(_:didChangeSizeTo:)` (#3563) via Cesar de la Vega (@vegaro) * `Tests`: running tests on `macOS` (#3533) via NachoSoto (@NachoSoto) * `Integration Tests`: split into separate jobs (#3560) via NachoSoto (@NachoSoto)
Depends on RevenueCat/purchases-ios#3563 --------- Co-authored-by: NachoSoto <ignaciosoto90@gmail.com>
paywallViewControlleSizeDidChange
to notify of size changes