Various improvements

This commit is contained in:
Ilya Laktyushin
2023-02-14 22:44:44 +04:00
parent 90e79d827e
commit 064fb7ae3e
51 changed files with 707 additions and 447 deletions

View File

@@ -361,7 +361,7 @@ open class NavigationController: UINavigationController, ContainableController,
}
}
private func updateContainers(layout rawLayout: ContainerViewLayout, transition: ContainedViewLayoutTransition) {
private func updateContainers(layout rawLayout: ContainerViewLayout, transition: ContainedViewLayoutTransition, completion: @escaping () -> Void = {}) {
self.isUpdatingContainers = true
var layout = rawLayout
@@ -1447,7 +1447,9 @@ open class NavigationController: UINavigationController, ContainableController,
return controller
}
if let layout = self.validLayout {
self.updateContainers(layout: layout, transition: animated ? .animated(duration: 0.5, curve: .spring) : .immediate)
self.updateContainers(layout: layout, transition: animated ? .animated(duration: 0.5, curve: .spring) : .immediate, completion: { [weak self] in
self?.notifyAccessibilityScreenChanged()
})
}
self._viewControllersPromise.set(self.viewControllers)
}
@@ -1705,4 +1707,8 @@ open class NavigationController: UINavigationController, ContainableController,
}
return hidden
}
private func notifyAccessibilityScreenChanged() {
UIAccessibility.post(notification: UIAccessibility.Notification.screenChanged, argument: nil)
}
}