Closed SwiftedMind closed 4 years ago
Hey @d3mueller,
the reason for this is that we are calling loadViewIfNeeded
before we are actually showing the view, because we would like to create all the bindings with views created out of IBOutlets, that are only instantiated when loading the view. So, if it is an issue at all, it would only be limited to the example app and not the framework itself.
Let me know, if you notice any actual issues with it, since you could also already set the prefersLargeTitles property when initializing the UINavigationController instead of the viewDidLoad of one of its child view controllers.
Hey, thanks for the quick answer!
Yeah, that makes sense. I have actually not thought about setting the prefersLargeTitle
inside the Coordinator, thanks for the tip! That should work perfectly fine in my case.
Appreciate the help :)
Alright, since it seems to have fixed the issue, I will close it. Glad I could help!
Hey,
loving this framework so far :D. I do have one problem with it, though.
When pushing a new view controller in a
UINavigationController
the traditional way, the presented view controller'snavigationController
property is set pretty fast and already accessible inside theviewDidLoad()
method to set things likeprefersLargeTitle
and stuff.However, when using a
NavigationCoordinator
with a.push
transition, thenavigationController
isn't set that early. It's only available by the timeviewWillAppear(animated:)
is called and that seems to be too late for some things, like setting:navigationController?.navigationBar.prefersLargeTitles = true
At least, it doesn't show a large title this way (only after scrolling up and down a bit it updates to a proper large title).
Is there something I can do? Any idea why the
navigationController
property is set so late in the process?Thanks!
Let me know if you need more information. I don't know what else would be needed to clarify this. If you need an example, open the XCoordinator-Example app and set a breakpoint in the
AboutViewController
'sviewDidLoad
method. In there,navigationController
is not set yet, which is a problem I think