Make green buttons at the bottom taller to respect safe area for phones with no home buttons, iPhone Xes

pull/925/head
Hwee-Boon Yar 6 years ago
parent 3f791ee617
commit 91a8cd68ae
  1. 4
      AlphaWallet/Market/ViewControllers/ImportMagicTokenViewController.swift
  2. 4
      AlphaWallet/Redeem/ViewControllers/RedeemTokenCardQuantitySelectionViewController.swift
  3. 4
      AlphaWallet/Redeem/ViewControllers/RedeemTokenViewController.swift
  4. 4
      AlphaWallet/Sell/ViewControllers/EnterSellTokensCardPriceQuantityViewController.swift
  5. 4
      AlphaWallet/Sell/ViewControllers/SellTokensCardViewController.swift
  6. 4
      AlphaWallet/Sell/ViewControllers/SetSellTokensCardExpiryDateViewController.swift
  7. 4
      AlphaWallet/Style/AppStyle.swift
  8. 4
      AlphaWallet/Tokens/ViewControllers/NewTokenViewController.swift
  9. 5
      AlphaWallet/Tokens/ViewControllers/TokensCardViewController.swift
  10. 4
      AlphaWallet/Transfer/ViewControllers/ChooseTokenCardTransferModeViewController.swift
  11. 4
      AlphaWallet/Transfer/ViewControllers/SendViewController.swift
  12. 4
      AlphaWallet/Transfer/ViewControllers/SetTransferTokensCardExpiryDateViewController.swift
  13. 4
      AlphaWallet/Transfer/ViewControllers/TransferTokensCardQuantitySelectionViewController.swift
  14. 4
      AlphaWallet/Transfer/ViewControllers/TransferTokensCardViaWalletAddressViewController.swift
  15. 4
      AlphaWallet/Transfer/ViewControllers/TransferTokensCardViewController.swift
  16. 4
      AlphaWallet/Wallet/ViewControllers/ImportWalletViewController.swift

@ -117,7 +117,7 @@ class ImportMagicTokenViewController: UIViewController, OptionalTokenVerifiableS
footerBar.backgroundColor = Colors.appHighlightGreen
roundedBackground.addSubview(footerBar)
let buttonsHeight = CGFloat(60)
let buttonsHeight = Metrics.greenButtonHeight
footerBar.addSubview(buttonsStackView)
buttonSeparator.translatesAutoresizingMaskIntoConstraints = false
@ -152,7 +152,7 @@ class ImportMagicTokenViewController: UIViewController, OptionalTokenVerifiableS
footerBar.leadingAnchor.constraint(equalTo: view.leadingAnchor),
footerBar.trailingAnchor.constraint(equalTo: view.trailingAnchor),
footerBar.heightAnchor.constraint(equalToConstant: buttonsHeight),
footerBar.topAnchor.constraint(equalTo: view.layoutGuide.bottomAnchor, constant: -buttonsHeight),
footerBar.bottomAnchor.constraint(equalTo: view.bottomAnchor),
statusLabel.widthAnchor.constraint(equalTo: tokenCardRowView.widthAnchor, constant: -20),

@ -81,7 +81,7 @@ class RedeemTokenCardQuantitySelectionViewController: UIViewController, TokenVer
footerBar.backgroundColor = Colors.appHighlightGreen
roundedBackground.addSubview(footerBar)
let buttonsHeight = CGFloat(60)
let buttonsHeight = Metrics.greenButtonHeight
footerBar.addSubview(buttonsStackView)
NSLayoutConstraint.activate([
@ -103,7 +103,7 @@ class RedeemTokenCardQuantitySelectionViewController: UIViewController, TokenVer
footerBar.leadingAnchor.constraint(equalTo: view.leadingAnchor),
footerBar.trailingAnchor.constraint(equalTo: view.trailingAnchor),
footerBar.heightAnchor.constraint(equalToConstant: buttonsHeight),
footerBar.topAnchor.constraint(equalTo: view.layoutGuide.bottomAnchor, constant: -buttonsHeight),
footerBar.bottomAnchor.constraint(equalTo: view.bottomAnchor),
] + roundedBackground.createConstraintsWithContainer(view: view))
}

@ -63,7 +63,7 @@ class RedeemTokenViewController: UIViewController, TokenVerifiableStatusViewCont
footerBar.backgroundColor = Colors.appHighlightGreen
roundedBackground.addSubview(footerBar)
let buttonsHeight = CGFloat(60)
let buttonsHeight = Metrics.greenButtonHeight
footerBar.addSubview(buttonsStackView)
NSLayoutConstraint.activate([
@ -79,7 +79,7 @@ class RedeemTokenViewController: UIViewController, TokenVerifiableStatusViewCont
footerBar.leadingAnchor.constraint(equalTo: view.leadingAnchor),
footerBar.trailingAnchor.constraint(equalTo: view.trailingAnchor),
footerBar.heightAnchor.constraint(equalToConstant: buttonsHeight),
footerBar.topAnchor.constraint(equalTo: view.layoutGuide.bottomAnchor, constant: -buttonsHeight),
footerBar.bottomAnchor.constraint(equalTo: view.bottomAnchor),
] + roundedBackground.createConstraintsWithContainer(view: view))
}

@ -165,7 +165,7 @@ class EnterSellTokensCardPriceQuantityViewController: UIViewController, TokenVer
footerBar.backgroundColor = Colors.appHighlightGreen
roundedBackground.addSubview(footerBar)
let buttonsHeight = CGFloat(60)
let buttonsHeight = Metrics.greenButtonHeight
footerBar.addSubview(buttonsStackView)
NSLayoutConstraint.activate([
@ -201,7 +201,7 @@ class EnterSellTokensCardPriceQuantityViewController: UIViewController, TokenVer
footerBar.leadingAnchor.constraint(equalTo: view.leadingAnchor),
footerBar.trailingAnchor.constraint(equalTo: view.trailingAnchor),
footerBar.heightAnchor.constraint(equalToConstant: buttonsHeight),
footerBar.topAnchor.constraint(equalTo: view.layoutGuide.bottomAnchor, constant: -buttonsHeight),
footerBar.bottomAnchor.constraint(equalTo: view.bottomAnchor),
scrollView.leadingAnchor.constraint(equalTo: view.leadingAnchor),

@ -57,7 +57,7 @@ class SellTokensCardViewController: UIViewController, TokenVerifiableStatusViewC
footerBar.backgroundColor = Colors.appHighlightGreen
roundedBackground.addSubview(footerBar)
let buttonsHeight = CGFloat(60)
let buttonsHeight = Metrics.greenButtonHeight
footerBar.addSubview(buttonsStackView)
NSLayoutConstraint.activate([
@ -73,7 +73,7 @@ class SellTokensCardViewController: UIViewController, TokenVerifiableStatusViewC
footerBar.leadingAnchor.constraint(equalTo: view.leadingAnchor),
footerBar.trailingAnchor.constraint(equalTo: view.trailingAnchor),
footerBar.heightAnchor.constraint(equalToConstant: buttonsHeight),
footerBar.topAnchor.constraint(equalTo: view.layoutGuide.bottomAnchor, constant: -buttonsHeight),
footerBar.bottomAnchor.constraint(equalTo: view.bottomAnchor),
] + roundedBackground.createConstraintsWithContainer(view: view))
}

@ -164,7 +164,7 @@ class SetSellTokensCardExpiryDateViewController: UIViewController, TokenVerifiab
footerBar.backgroundColor = Colors.appHighlightGreen
roundedBackground.addSubview(footerBar)
let buttonsHeight = CGFloat(60)
let buttonsHeight = Metrics.greenButtonHeight
footerBar.addSubview(buttonsStackView)
NSLayoutConstraint.activate([
@ -208,7 +208,7 @@ class SetSellTokensCardExpiryDateViewController: UIViewController, TokenVerifiab
footerBar.leadingAnchor.constraint(equalTo: view.leadingAnchor),
footerBar.trailingAnchor.constraint(equalTo: view.trailingAnchor),
footerBar.heightAnchor.constraint(equalToConstant: buttonsHeight),
footerBar.topAnchor.constraint(equalTo: view.layoutGuide.bottomAnchor, constant: -buttonsHeight),
footerBar.bottomAnchor.constraint(equalTo: view.bottomAnchor),
scrollView.leadingAnchor.constraint(equalTo: view.leadingAnchor),

@ -94,3 +94,7 @@ extension UISegmentedControl {
subviews.forEach { $0.tintColor = Colors.appBackground }
}
}
enum Metrics {
static let greenButtonHeight = CGFloat(48)
}

@ -106,7 +106,7 @@ class NewTokenViewController: UIViewController, CanScanQRCode {
footerBar.backgroundColor = Colors.appHighlightGreen
roundedBackground.addSubview(footerBar)
let buttonsHeight = CGFloat(60)
let buttonsHeight = Metrics.greenButtonHeight
footerBar.addSubview(buttonsStackView)
let xMargin = CGFloat(7)
@ -129,7 +129,7 @@ class NewTokenViewController: UIViewController, CanScanQRCode {
footerBar.leadingAnchor.constraint(equalTo: view.leadingAnchor),
footerBar.trailingAnchor.constraint(equalTo: view.trailingAnchor),
footerBar.heightAnchor.constraint(equalToConstant: buttonsHeight),
footerBar.topAnchor.constraint(equalTo: view.layoutGuide.bottomAnchor, constant: -buttonsHeight),
footerBar.bottomAnchor.constraint(equalTo: view.bottomAnchor),
scrollView.leadingAnchor.constraint(equalTo: view.leadingAnchor),

@ -99,7 +99,7 @@ class TokensCardViewController: UIViewController, TokenVerifiableStatusViewContr
footerBar.backgroundColor = Colors.appHighlightGreen
roundedBackground.addSubview(footerBar)
let buttonsHeight = CGFloat(60)
let buttonsHeight = Metrics.greenButtonHeight
footerBar.addSubview(buttonsStackView)
let separator0 = UIView()
@ -136,10 +136,11 @@ class TokensCardViewController: UIViewController, TokenVerifiableStatusViewContr
footerBar.leadingAnchor.constraint(equalTo: view.leadingAnchor),
footerBar.trailingAnchor.constraint(equalTo: view.trailingAnchor),
footerBar.heightAnchor.constraint(equalToConstant: buttonsHeight),
footerBar.topAnchor.constraint(equalTo: view.layoutGuide.bottomAnchor, constant: -buttonsHeight),
footerBar.bottomAnchor.constraint(equalTo: view.bottomAnchor),
] + roundedBackground.createConstraintsWithContainer(view: view))
registerForPreviewing(with: self, sourceView: tableView)
}

@ -75,7 +75,7 @@ class ChooseTokenCardTransferModeViewController: UIViewController, TokenVerifiab
footerBar.backgroundColor = Colors.appHighlightGreen
roundedBackground.addSubview(footerBar)
let buttonsHeight = CGFloat(60)
let buttonsHeight = Metrics.greenButtonHeight
footerBar.addSubview(buttonsStackView)
let separator0 = UIView()
@ -106,7 +106,7 @@ class ChooseTokenCardTransferModeViewController: UIViewController, TokenVerifiab
footerBar.leadingAnchor.constraint(equalTo: view.leadingAnchor),
footerBar.trailingAnchor.constraint(equalTo: view.trailingAnchor),
footerBar.heightAnchor.constraint(equalToConstant: buttonsHeight),
footerBar.topAnchor.constraint(equalTo: view.layoutGuide.bottomAnchor, constant: -buttonsHeight),
footerBar.bottomAnchor.constraint(equalTo: view.bottomAnchor),
] + roundedBackground.createConstraintsWithContainer(view: view))
}

@ -173,7 +173,7 @@ class SendViewController: UIViewController, CanScanQRCode, TokenVerifiableStatus
footerBar.backgroundColor = Colors.appHighlightGreen
roundedBackground.addSubview(footerBar)
let buttonsHeight = CGFloat(60)
let buttonsHeight = Metrics.greenButtonHeight
footerBar.addSubview(buttonsStackView)
NSLayoutConstraint.activate([
@ -209,7 +209,7 @@ class SendViewController: UIViewController, CanScanQRCode, TokenVerifiableStatus
footerBar.leadingAnchor.constraint(equalTo: view.leadingAnchor),
footerBar.trailingAnchor.constraint(equalTo: view.trailingAnchor),
footerBar.heightAnchor.constraint(equalToConstant: buttonsHeight),
footerBar.topAnchor.constraint(equalTo: view.layoutGuide.bottomAnchor, constant: -buttonsHeight),
footerBar.bottomAnchor.constraint(equalTo: view.bottomAnchor),
] + roundedBackground.createConstraintsWithContainer(view: view))

@ -149,7 +149,7 @@ class SetTransferTokensCardExpiryDateViewController: UIViewController, TokenVeri
footerBar.backgroundColor = Colors.appHighlightGreen
roundedBackground.addSubview(footerBar)
let buttonsHeight = CGFloat(60)
let buttonsHeight = Metrics.greenButtonHeight
footerBar.addSubview(buttonsStackView)
NSLayoutConstraint.activate([
@ -190,7 +190,7 @@ class SetTransferTokensCardExpiryDateViewController: UIViewController, TokenVeri
footerBar.leadingAnchor.constraint(equalTo: view.leadingAnchor),
footerBar.trailingAnchor.constraint(equalTo: view.trailingAnchor),
footerBar.heightAnchor.constraint(equalToConstant: buttonsHeight),
footerBar.topAnchor.constraint(equalTo: view.layoutGuide.bottomAnchor, constant: -buttonsHeight),
footerBar.bottomAnchor.constraint(equalTo: view.bottomAnchor),
scrollView.leadingAnchor.constraint(equalTo: view.leadingAnchor),

@ -82,7 +82,7 @@ class TransferTokensCardQuantitySelectionViewController: UIViewController, Token
footerBar.backgroundColor = Colors.appHighlightGreen
roundedBackground.addSubview(footerBar)
let buttonsHeight = CGFloat(60)
let buttonsHeight = Metrics.greenButtonHeight
footerBar.addSubview(buttonsStackView)
NSLayoutConstraint.activate([
@ -104,7 +104,7 @@ class TransferTokensCardQuantitySelectionViewController: UIViewController, Token
footerBar.leadingAnchor.constraint(equalTo: view.leadingAnchor),
footerBar.trailingAnchor.constraint(equalTo: view.trailingAnchor),
footerBar.heightAnchor.constraint(equalToConstant: buttonsHeight),
footerBar.topAnchor.constraint(equalTo: view.layoutGuide.bottomAnchor, constant: -buttonsHeight),
footerBar.bottomAnchor.constraint(equalTo: view.bottomAnchor),
] + roundedBackground.createConstraintsWithContainer(view: view))
}

@ -84,7 +84,7 @@ class TransferTokensCardViaWalletAddressViewController: UIViewController, TokenV
footerBar.backgroundColor = Colors.appHighlightGreen
roundedBackground.addSubview(footerBar)
let buttonsHeight = CGFloat(60)
let buttonsHeight = Metrics.greenButtonHeight
footerBar.addSubview(buttonsStackView)
NSLayoutConstraint.activate([
@ -107,7 +107,7 @@ class TransferTokensCardViaWalletAddressViewController: UIViewController, TokenV
footerBar.leadingAnchor.constraint(equalTo: view.leadingAnchor),
footerBar.trailingAnchor.constraint(equalTo: view.trailingAnchor),
footerBar.heightAnchor.constraint(equalToConstant: buttonsHeight),
footerBar.topAnchor.constraint(equalTo: view.layoutGuide.bottomAnchor, constant: -buttonsHeight),
footerBar.bottomAnchor.constraint(equalTo: view.bottomAnchor),
] + roundedBackground.createConstraintsWithContainer(view: view))
}

@ -59,7 +59,7 @@ class TransferTokensCardViewController: UIViewController, TokenVerifiableStatusV
footerBar.backgroundColor = Colors.appHighlightGreen
roundedBackground.addSubview(footerBar)
let buttonsHeight = CGFloat(60)
let buttonsHeight = Metrics.greenButtonHeight
footerBar.addSubview(buttonsStackView)
NSLayoutConstraint.activate([
@ -75,7 +75,7 @@ class TransferTokensCardViewController: UIViewController, TokenVerifiableStatusV
footerBar.leadingAnchor.constraint(equalTo: view.leadingAnchor),
footerBar.trailingAnchor.constraint(equalTo: view.trailingAnchor),
footerBar.heightAnchor.constraint(equalToConstant: buttonsHeight),
footerBar.topAnchor.constraint(equalTo: view.layoutGuide.bottomAnchor, constant: -buttonsHeight),
footerBar.bottomAnchor.constraint(equalTo: view.bottomAnchor),
] + roundedBackground.createConstraintsWithContainer(view: view))
}

@ -116,7 +116,7 @@ class ImportWalletViewController: UIViewController, CanScanQRCode {
footerBar.backgroundColor = Colors.appHighlightGreen
roundedBackground.addSubview(footerBar)
let buttonsHeight = CGFloat(60)
let buttonsHeight = Metrics.greenButtonHeight
footerBar.addSubview(buttonsStackView)
let xMargin = CGFloat(7)
@ -147,7 +147,7 @@ class ImportWalletViewController: UIViewController, CanScanQRCode {
footerBar.leadingAnchor.constraint(equalTo: view.leadingAnchor),
footerBar.trailingAnchor.constraint(equalTo: view.trailingAnchor),
footerBar.heightAnchor.constraint(equalToConstant: buttonsHeight),
footerBar.topAnchor.constraint(equalTo: view.layoutGuide.bottomAnchor, constant: -buttonsHeight),
footerBar.bottomAnchor.constraint(equalTo: view.bottomAnchor),
scrollView.leadingAnchor.constraint(equalTo: view.leadingAnchor),

Loading…
Cancel
Save