Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Don't stop looking for the view controller when it's a UINavigationController #237
I needed to put a
This fixes the stylesheet not being able to be set because when it found a
An alternative so that we don't have to recurse one more time would be something like this:
when UINavigationController if root_view_controller.visibleViewController.is_a?(UIViewController) root_view_controller.visibleViewController else current_view_controller(root_view_controller.visibleViewController) end when UITabBarController # ...
…ntroller I needed to put a UITablBarController inside a UINavigationController (I know, NOT recommended by Apple, but I had to do it nonetheless). This fixes the stylesheet not being able to be set because when it found a UINavigationController as the root_view_controller, it just gave up. I'm asking the method to keep searching till it gets an actual UIViewController and not blindly trust that the visibleViewController is a UIViewController.