mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-16 06:28:27 +02:00
Update bridge presenter template to auto-implement dismiss gesture
This commit is contained in:
@@ -54,7 +54,9 @@ final class FlowTemplateCoordinatorBridgePresenter: NSObject {
|
||||
func present(from viewController: UIViewController, animated: Bool) {
|
||||
let flowTemplateCoordinator = FlowTemplateCoordinator(session: self.session)
|
||||
flowTemplateCoordinator.delegate = self
|
||||
viewController.present(flowTemplateCoordinator.toPresentable(), animated: animated, completion: nil)
|
||||
let presentable = flowTemplateCoordinator.toPresentable()
|
||||
presentable.presentationController?.delegate = self
|
||||
viewController.present(presentable, animated: animated, completion: nil)
|
||||
flowTemplateCoordinator.start()
|
||||
|
||||
self.coordinator = flowTemplateCoordinator
|
||||
@@ -80,3 +82,13 @@ extension FlowTemplateCoordinatorBridgePresenter: FlowTemplateCoordinatorDelegat
|
||||
self.delegate?.flowTemplateCoordinatorBridgePresenterDelegateDidComplete(self)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - UIAdaptivePresentationControllerDelegate
|
||||
|
||||
extension FlowTemplateCoordinatorBridgePresenter: UIAdaptivePresentationControllerDelegate {
|
||||
|
||||
func flowTemplateCoordinatorDidComplete(_ presentationController: UIPresentationController) {
|
||||
self.delegate?.flowTemplateCoordinatorBridgePresenterDelegateDidComplete(self)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user