Repository navigation
Conversation
|
|
||
| private func appendViewController(_ viewController: UIViewController) { | ||
| addChild(viewController) | ||
| viewController.beginAppearanceTransition(true, animated: false) |
There was a problem hiding this comment.
Could we verify that this does not duplicate appearance callbacks? UIKit automatically forwards
appearance callbacks to child view controllers by default; manual beginAppearanceTransition /
endAppearanceTransition forwarding is needed when the container overrides
shouldAutomaticallyForwardAppearanceMethods to return false.I do not see that override in ContainmentViewController, but please confirm whether any subclass opts
out of automatic forwarding. If not, a small regression test asserting a single initial onAppear /
viewDidAppear would help ensure we do not trigger duplicate initial loads.Apple documentation:
There was a problem hiding this comment.
Yeah thanks for pointing this, I measured it and the manual calls did indeed double viewWillAppear/viewDidAppear. I removed them all and each now fires once while the component still loads.
…ponent Adds PayPal Saved Payment Method to the Demo integrations, with a sheet that sets every PayPalSavedPaymentMethodViewStyle value. The custom environment now uses a pasted client token from Custom Authorization, so a token carrying paymentMethodIdJwt can be used. Embedded child views now receive appearance callbacks so SwiftUI onAppear fires.
e994e64 to
bf72378
Compare
Summary of changes
Adds a Demo screen for
PayPalSavedPaymentMethodView.PayPalSavedPaymentMethodViewStylevalue. Each value can be left unset so the SDK default applies.paymentMethodIdJwt.Testing
paymentMethodIdJwtinto Custom Authorization, Integration PayPal Saved Payment Method.AI Usage
Which AI Agent Was Used?
How was AI used?
Used Copilot to write the Demo screen and style editor, and to port them onto the split component PRs.
Estimated AI Code Contribution
Checklist
Authors
Inner Source Process
Internal to PayPal contributors should fill out this section. All others can delete.
PR should follow these steps before codeowners review will begin:
/inner sourceon this PR — this will automatically add theinner sourceandtech lead review requiredlabels. Open the PR in a draft state./readyon this PR — this will automatically remove thetech lead review requiredlabel. Move the PR to ready to review.Inner Source Checklist