[Add] configuration closure controller for present style ios 13
This commit is contained in:
parent
d450d5489b
commit
843ee807c4
|
|
@ -29,6 +29,7 @@ public protocol ModalRoutable: Presentable {
|
|||
|
||||
func present(_ module: Presentable?)
|
||||
func present(_ module: Presentable?, animated: Bool)
|
||||
func present(_ module: Presentable?, configurationClosure: ConfigurationClosure?)
|
||||
func present(_ module: Presentable?, animated: Bool, configurationClosure: ConfigurationClosure?)
|
||||
|
||||
func dismissModule()
|
||||
|
|
|
|||
|
|
@ -44,6 +44,10 @@ public final class ModalRouter: ModalRoutable {
|
|||
present(module, animated: animated, configurationClosure: nil)
|
||||
}
|
||||
|
||||
public func present(_ module: Presentable?, configurationClosure: ConfigurationClosure?) {
|
||||
present(module, animated: true, configurationClosure: configurationClosure)
|
||||
}
|
||||
|
||||
public func present(_ module: Presentable?, animated: Bool, configurationClosure: ConfigurationClosure?) {
|
||||
guard let controller = module?.toPresent() else {
|
||||
return
|
||||
|
|
|
|||
|
|
@ -129,6 +129,10 @@ open class StackRouter: StackRoutable {
|
|||
modalRouter?.present(module, animated: animated)
|
||||
}
|
||||
|
||||
public func present(_ module: Presentable?, configurationClosure: ConfigurationClosure?) {
|
||||
modalRouter?.present(module, animated: true, configurationClosure: configurationClosure)
|
||||
}
|
||||
|
||||
public func present(_ module: Presentable?, animated: Bool, configurationClosure: ConfigurationClosure?) {
|
||||
modalRouter?.present(module, animated: animated, configurationClosure: configurationClosure)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue