File tree 1 file changed +14
-0
lines changed
Sources/NavigationTransitions
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -145,6 +145,12 @@ extension UINavigationController {
145
145
customDelegate. transition = transition
146
146
}
147
147
148
+ swizzle (
149
+ UINavigationController . self,
150
+ #selector( UINavigationController . setViewControllers) ,
151
+ #selector( UINavigationController . setViewControllers_animateIfNeeded)
152
+ )
153
+
148
154
swizzle (
149
155
UINavigationController . self,
150
156
#selector( UINavigationController . pushViewController) ,
@@ -232,6 +238,14 @@ extension UINavigationController {
232
238
}
233
239
234
240
extension 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
+
235
249
@objc private func pushViewController_animateIfNeeded( _ viewController: UIViewController , animated: Bool ) {
236
250
if let transitionDelegate = customDelegate {
237
251
pushViewController_animateIfNeeded ( viewController, animated: transitionDelegate. transition. animation != nil )
You can’t perform that action at this time.
0 commit comments