Skip to content
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

[MBL-1334] Bind styles when PostCampaignPledgeRewardsSummaryTotalViewController loads #2032

Merged
merged 2 commits into from
Apr 11, 2024

Conversation

ifosli
Copy link
Contributor

@ifosli ifosli commented Apr 10, 2024

📲 What

Call bindStyles in viewDidLoad. We usually swizzle view controllers to call bindStyles on viewWillAppear and traitCollectionDidChange, but for some reason, on iOS 16, neither of these trigger bindStyles for this class. I think embedding a view controller's view in a different view controller is preventing viewWillAppear from triggering it, but I'm not sure why traitCollectionDidChange calls bindStyles on iOS 17 but not on iOS 16. Regardless of why, calling bindStyles in viewDidLoad fixes the problem and seems significantly safer.

👀 See

Jira

Before 🐛 After 🦋
image image

✅ Acceptance criteria

  • Total row in the pledge summary table looks good on iOS 16 as well

@ifosli ifosli self-assigned this Apr 10, 2024
@ifosli ifosli marked this pull request as ready for review April 11, 2024 15:37
Copy link
Contributor

@amy-at-kickstarter amy-at-kickstarter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I'd double-check if this view controller was being correctly added as a child of its parent container, and see if that fixes it, but this change seems harmless anyways.

@ifosli
Copy link
Contributor Author

ifosli commented Apr 11, 2024

LGTM. I'd double-check if this view controller was being correctly added as a child of its parent container, and see if that fixes it, but this change seems harmless anyways.

Ahh, good call! that was the problem! I've added it as a child of the parent and I left the bindStyles call in as well.

@ifosli ifosli merged commit 5cafc54 into main Apr 11, 2024
5 checks passed
@ifosli ifosli deleted the marginsMissingInRewardsTableBug branch April 11, 2024 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants