Merge pull request #4227 from oa-s/#4221

Add tap gesture for closing TransactionConfirmaction screen #4221
pull/4229/head
Hwee-Boon Yar 3 years ago committed by GitHub
commit 00f30acc34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      AlphaWallet/Transfer/Coordinators/TransactionConfirmationCoordinator.swift

@ -77,6 +77,8 @@ class TransactionConfirmationCoordinator: Coordinator {
private lazy var hostViewController: FloatingPanelController = {
let panel = FloatingPanelController(isPanEnabled: false)
panel.layout = SelfSizingPanelLayout(referenceGuide: .superview)
panel.shouldDismissOnBackdrop = true
panel.delegate = self
panel.set(contentViewController: rootViewController)
return panel
@ -143,6 +145,12 @@ class TransactionConfirmationCoordinator: Coordinator {
}
}
extension TransactionConfirmationCoordinator: FloatingPanelControllerDelegate {
func floatingPanelDidRemove(_ fpc: FloatingPanelController) {
delegate?.didClose(in: self)
}
}
extension TransactionConfirmationCoordinator: TransactionConfirmationViewControllerDelegate {
func didInvalidateLayout(in controller: TransactionConfirmationViewController) {
@ -210,6 +218,7 @@ extension TransactionConfirmationCoordinator: TransactionConfirmationViewControl
let panel = FloatingPanelController(isPanEnabled: false)
panel.layout = SelfSizingPanelLayout(referenceGuide: .superview)
panel.shouldDismissOnBackdrop = true
panel.set(contentViewController: errorViewController)
rootViewController.present(panel, animated: true)

Loading…
Cancel
Save