File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Sources/NavigationTransitions Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -145,6 +145,12 @@ extension UINavigationController {
145145 customDelegate. transition = transition
146146 }
147147
148+ swizzle (
149+ UINavigationController . self,
150+ #selector( UINavigationController . setViewControllers) ,
151+ #selector( UINavigationController . setViewControllers_animateIfNeeded)
152+ )
153+
148154 swizzle (
149155 UINavigationController . self,
150156 #selector( UINavigationController . pushViewController) ,
@@ -232,6 +238,14 @@ extension UINavigationController {
232238}
233239
234240extension UINavigationController {
241+ @objc private func setViewControllers_animateIfNeeded( _ viewControllers: [ UIViewController ] , animated: Bool ) {
242+ if let transitionDelegate = customDelegate {
243+ setViewControllers_animateIfNeeded ( viewControllers, animated: transitionDelegate. transition. animation != nil )
244+ } else {
245+ setViewControllers_animateIfNeeded ( viewControllers, animated: animated)
246+ }
247+ }
248+
235249 @objc private func pushViewController_animateIfNeeded( _ viewController: UIViewController , animated: Bool ) {
236250 if let transitionDelegate = customDelegate {
237251 pushViewController_animateIfNeeded ( viewController, animated: transitionDelegate. transition. animation != nil )
You can’t perform that action at this time.
0 commit comments