Closed szweier closed 8 years ago
Hey, thanks for your contribution! Sorry if I am missing the point, but why don't you just use:
viewController.shyNavBarManager;
I made the method that allows me to set a specific view controller during initialization to avoid having it default to using self. I tried using KVO to force write a new view controller after it set the default but it doesn't seem to override all set properties and doesn't function correctly. The only way I was able to set the property correctly was to do it once (rather than replacing the set view controller). This change will keep all current implementations the same as it will skip into the new method sending self. Otherwise if other implementations need to specify a different VC they can. Hopefully that explains it a little better.
Unless I'm not understanding your suggestion. I'll give another solution a shot first and see if it works but I feel as though this may be a beneficial addition regardless.
@szweier Sorry, I am always slow at understanding other people's point of view :sweat_smile: I just tried using your code, and I see why it is different. Thanks!
No problem, thanks.
In the case where
self
is not the correct viewController to use for the navigation control you can now set a specific viewController using the new method.Use case
A UINavigationController with a UITabBarController in it. We need to set the scrollView equal to the UIViewController's UITableView, but the ViewController needs to be the TabBarController.