You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using your DrawerController , thank you for awesome library.
My issue:
I'm using KYDrawerController with UITabbarController, I need to get Top Most controller of the application which is showing now but I'm not able to get correct one.
here is the code I'm using.
extension UIViewController {
func topMostViewController() -> UIViewController {
if let navigation = self.presentedViewController as? UINavigationController {
if let visibleController = navigation.visibleViewController {
return visibleController.topMostViewController()
}
}
if let tab = self.presentedViewController as? UITabBarController {
if let selectedTab = tab.selectedViewController {
return selectedTab.topMostViewController()
}
return tab.topMostViewController()
}
if self.presentedViewController == nil {
return self
}
return self.presentedViewController!.topMostViewController()
}
}
extension UIApplication {
func topMostViewController() -> UIViewController? {
return self.keyWindow?.rootViewController?.topMostViewController()
}
}
Please correct me if I'm using wrong approch.
The text was updated successfully, but these errors were encountered:
I'm using your DrawerController , thank you for awesome library.
My issue:
I'm using KYDrawerController with UITabbarController, I need to get Top Most controller of the application which is showing now but I'm not able to get correct one.
here is the code I'm using.
Please correct me if I'm using wrong approch.
The text was updated successfully, but these errors were encountered: