Various UI improvements

This commit is contained in:
Ilya Laktyushin
2022-09-14 23:37:32 +03:00
parent ae60febadf
commit 23e1eeda80
11 changed files with 53 additions and 3 deletions

View File

@@ -1307,6 +1307,18 @@ open class NavigationController: UINavigationController, ContainableController,
completion()
}
public func updateContainerPulled(_ pushed: Bool) {
guard self.modalContainers.isEmpty else {
return
}
if let rootContainer = self.rootContainer, case let .flat(container) = rootContainer {
let scale: CGFloat = pushed ? 1.06 : 1.0
container.view.layer.transform = CATransform3DMakeScale(scale, scale, 1.0)
container.view.layer.animateScale(from: pushed ? 1.0 : 1.06, to: scale, duration: 0.3, timingFunction: kCAMediaTimingFunctionSpring)
}
}
open override func pushViewController(_ viewController: UIViewController, animated: Bool) {
var controllers = self.viewControllers
controllers.append(viewController)