jdisho / Papr

🌁 An Unsplash app for iOS
Apache License 2.0
1.15k stars 149 forks source link

SceneCoodinator.swift=>actualViewController=>return issue #62

Closed spiderbob closed 6 years ago

spiderbob commented 6 years ago

Papr/Coodinator/SceneCoodinator.swift

static func actualViewController(for viewController: UIViewController) -> UIViewController {
    var controller = viewController
    if let tabBarController = controller as? UITabBarController {
        guard let selectedViewController = tabBarController.selectedViewController else {
            return tabBarController
        }
        controller = selectedViewController
    }
    if let navigationController = viewController as? UINavigationController {
        return navigationController.viewControllers.first!
    }
    -return viewController  
    +return controller
}
jdisho commented 6 years ago

Thanks! Can you create a PR? @spiderbob

spiderbob commented 6 years ago

PR is created