Skip to content
This repository has been archived by the owner on Sep 15, 2023. It is now read-only.

Commit

Permalink
improves display of certificates for small phones
Browse files Browse the repository at this point in the history
  • Loading branch information
zimmermannubique committed May 31, 2021
1 parent 948a7e8 commit f42be2c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CovidCertificate/SharedUI/Views/QRCodeNameView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ class QRCodeNameView: UIView {
make.leading.trailing.equalToSuperview().inset(self.qrCodeInset)
make.bottom.equalToSuperview()
}

nameView.ub_setContentPriorityRequired()
birthdayLabelView.ub_setContentPriorityRequired()
}

// MARK: - Update
Expand Down
3 changes: 2 additions & 1 deletion Wallet/Screens/Homescreen/HomescreenCertificateView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ class HomescreenCertificateView: UIView {
}

contentView.addSubview(titleLabel)
titleLabel.ub_setContentPriorityRequired()

titleLabel.snp.makeConstraints { make in
make.top.left.right.equalToSuperview().inset(Padding.large)
Expand All @@ -91,7 +92,7 @@ class HomescreenCertificateView: UIView {

contentView.addSubview(stateView)
stateView.snp.makeConstraints { make in
make.top.greaterThanOrEqualTo(nameView.snp.bottom).offset(Padding.medium)
make.top.greaterThanOrEqualTo(nameView.snp.bottom).offset(Padding.medium + Padding.small)
make.bottom.left.right.equalToSuperview().inset(2.0 * Padding.small)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,14 @@ class HomescreenCertificatesViewController: ViewController {
private func setup() {
view.backgroundColor = .clear

let isSmall = view.frame.size.width <= 375
let pageControlBottomPaddig = isSmall ? Padding.large : (Padding.large + Padding.medium)

view.addSubview(pageControl)

pageControl.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.bottom.equalToSuperview().inset(Padding.large + Padding.medium)
make.bottom.equalToSuperview().inset(pageControlBottomPaddig)
}

stackScrollView.scrollView.isPagingEnabled = true
Expand Down

0 comments on commit f42be2c

Please sign in to comment.