Skip to content

Commit 0b0af89

Browse files
committed
Fixed bug with UIViewController instantiation inside UINavigationController
1 parent 2955133 commit 0b0af89

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

AppRouter.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Pod::Spec.new do |s|
33
s.name = "AppRouter"
4-
s.version = "3.0.2"
4+
s.version = "3.0.3"
55
s.summary = "UIViewController creation, navigation, utility methods for easy routing"
66

77
s.homepage = "https://github.com/MLSDev/AppRouter"

CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
6+
## [3.0.3](https://github.com/MLSDev/AppRouter/releases/tag/3.0.2)
7+
8+
Fixed bug with UIViewController instantiation inside UINavigationController
9+
10+
11+
## [3.0.2](https://github.com/MLSDev/AppRouter/releases/tag/3.0.2)
12+
13+
Small dependencies fix
14+
15+
516
## [3.0.1](https://github.com/MLSDev/AppRouter/releases/tag/3.0.1)
617

718
Typealias Action = () -> () was removed to avoid collisions with "Action" framework class names

Sources/Core/AppRouter+instantiations.swift

+3-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ extension UIStoryboard {
4848
return controller as? T
4949
}
5050
if let navigation = controller as? UINavigationController {
51-
return navigation.viewControllers.first as? T
51+
let first = navigation.viewControllers.first as? T
52+
first?.removeFromParentViewController()
53+
return first
5254
}
5355
return nil
5456
}

0 commit comments

Comments
 (0)