-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[NT-1240] PledgeViewController layout bugfix #1187
Conversation
@@ -144,6 +144,10 @@ final class PledgeAmountViewController: UIViewController { | |||
} | |||
} | |||
|
|||
override func didMove(toParent parent: UIViewController?) { | |||
self.verticalSpacer.isHidden = true |
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.
This spacer is not needed when this view is contained and was causing the scrollview to have an ambiguous content size.
override func viewDidLayoutSubviews() { | ||
super.viewDidLayoutSubviews() | ||
|
||
self.rootScrollView.contentInset = UIEdgeInsets( |
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.
Adjusting content insets instead of pinning the scrollview to the top of the button container.
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.
@justinswart I was only able to reproduce this on a 11 pro max, however when you tap "new card payment" and then dismiss the view, the "kickstarter is not a store" view is stuck below the pledge buttons.
@jgsamudio thanks for testing. I wasn't able to reproduce - could you perhaps attach a screenshot? |
📲 What
Fixes an inconsistent layout bug in
PledgeViewController
.🤔 Why
We discovered an issue that would cause
PledgeDisclaimerViewController
andPledgeDescriptionViewControllers
to be arbitrarily taller than necessary.🛠 How
This was a difficult one to track down but in the end @ifbarrera and I were able to prevent it from happening by changing the
PledgeDisclaimerViewController
andPledgeDescriptionViewController
to be regularUIView
s instead of nestedUIViewController
s. It's still not entirely clear to us why this change fixes the problem but it'll do for now.In trying to track this down I was also able to simplify the layout and prevent an ambiguous content size in the
rootScrollView
.👀 See
✅ Acceptance criteria
Navigate to the pledge view.