Compare commits
4 Commits
feature/fi
...
master
| Author | SHA1 | Date |
|---|---|---|
|
|
f5bc3f6cc7 | |
|
|
29068bcabf | |
|
|
2669b03f00 | |
|
|
d348414ab7 |
|
|
@ -1,11 +1,11 @@
|
|||
Pod::Spec.new do |s|
|
||||
s.name = 'TICoordinatorKit'
|
||||
s.version = '1.1.5'
|
||||
s.version = '1.1.7'
|
||||
s.summary = 'A framework for performing navigation in iOS application.'
|
||||
s.homepage = 'https://github.com/TouchInstinct/TICoordinatorKit'
|
||||
s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/TICoordinatorKit/'
|
||||
s.license = 'Apache License, Version 2.0'
|
||||
s.author = 'Touch Instinct'
|
||||
s.source = { :git => 'https://github.com/TouchInstinct/TICoordinatorKit.git', :tag => s.version.to_s }
|
||||
s.source = { :git => 'https://git.svc.touchin.ru/TouchInstinct/TICoordinatorKit.git', :tag => s.version.to_s }
|
||||
s.ios.deployment_target = '9.0'
|
||||
s.source_files = 'TICoordinatorKit/Classes/**/*'
|
||||
s.frameworks = 'UIKit'
|
||||
|
|
|
|||
|
|
@ -72,11 +72,18 @@ public final class ModalRouter: ModalRoutable {
|
|||
}
|
||||
|
||||
public func dismissModule(animated: Bool, completion: (() -> ())?) {
|
||||
rootController?.dismiss(animated: animated) { [weak self] in
|
||||
self?.topController = self?.rootController
|
||||
self?.childRootControllers = []
|
||||
let dismissCompletion = {
|
||||
self.topController = self.rootController
|
||||
self.childRootControllers = []
|
||||
completion?()
|
||||
}
|
||||
|
||||
guard rootController?.presentedViewController != nil else {
|
||||
dismissCompletion()
|
||||
return
|
||||
}
|
||||
|
||||
rootController?.dismiss(animated: animated, completion: dismissCompletion)
|
||||
}
|
||||
|
||||
public func presentChild(_ module: Presentable?,
|
||||
|
|
|
|||
|
|
@ -51,3 +51,21 @@ public protocol StackRoutable: ModalRoutable {
|
|||
func pop(to module: Presentable?)
|
||||
func pop(to module: Presentable?, animated: Bool)
|
||||
}
|
||||
|
||||
public extension StackRoutable {
|
||||
var headModuleInTheStack: Bool {
|
||||
if let headModule = headModule, headModule.toPresent()?.parent === toPresent() {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
func withAnimationCompletion(_ animationCompletion: (() -> Void)?,
|
||||
routerActions: (StackRoutable) -> Void) {
|
||||
CATransaction.begin()
|
||||
CATransaction.setCompletionBlock(animationCompletion)
|
||||
routerActions(self)
|
||||
CATransaction.commit()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue