Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ open class ContainerViewController: UIViewController {
return contentViewController
}

open override var childForHomeIndicatorAutoHidden: UIViewController? {
return contentViewController
}

/// Method creates and returns default transition context to implement animation between old and new content view controller.
/// Override it to use your custom transition context. It wouldn't be deallocated until animation has ended.
/// - parameter containerView: will be a container view for future animation
Expand Down
13 changes: 13 additions & 0 deletions Model/Model/Coordinator/ContainerCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,17 @@ open class ContainerCoordinator: Coordinator {
override open var activeViewController: UIViewController? {
return containerViewController.contentViewController
}

/// Sets new content coordinator with animator
/// - parameter newCoordinator: coordinator to set
/// - parameter animator: transition animator for setContentViewController func
open func setContentCoordinator(_ newCoordinator: Coordinator?, animator: UIViewControllerAnimatedTransitioning? = nil) {
if let coordinator = contentCoordinator {
coordinator.removeFromParent()
}
if let coordinator = newCoordinator {
add(child: coordinator)
}
containerViewController.setContentViewController(newCoordinator?.baseViewController, animator: animator)
}
}