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

[Bugfix] message banner hierarchy and rewards card size on smaller screens #803

Merged
merged 3 commits into from
Aug 16, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ final class MessageBannerViewController: UIViewController, NibLoading {
let hiddenConstant = self.view.frame.height + (self.view.superview?.safeAreaInsets.bottom ?? 0)

if !isHidden {
self.view.superview?.bringSubviewToFront(self.view)

self.view.isHidden = isHidden

self.bottomConstraint?.constant = hiddenConstant
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,12 @@ final class RewardsCollectionViewController: UICollectionViewController {
let adjustedContentInset = collectionView.adjustedContentInset

let topBottomSectionInsets = sectionInsets.top + sectionInsets.bottom
let leftRightSectionInsets = sectionInsets.left + sectionInsets.right
let topBottomContentInsets = adjustedContentInset.top + adjustedContentInset.bottom

let itemHeight = collectionView.frame.height - topBottomSectionInsets - topBottomContentInsets
let itemWidth = CheckoutConstants.RewardCard.Layout.width
let widthByBounds = collectionView.bounds.width - leftRightSectionInsets
let itemWidth = min(CheckoutConstants.RewardCard.Layout.width, widthByBounds)

return CGSize(width: itemWidth, height: itemHeight)
}
Expand Down