I want to prevent the new largeTitles navigationBar from collapsing into a standard small navigationBar when the user scrolls content. i.e. always keep the navigationBar large size with title in large font.
The reason I want to do this is that I have a segmentedControl in the navigationBar above the title exactly like in the iOS phone missed calls page. Except that I always want the title and segmented control to appear. I don't want the title to disappear when the user scrolls.
Is there any default behavior that can keep the new large navigationBar from collapsing when the user scrolls?
Maybe a little late but it might be useful to somebody:
If you add a scrollView (tableView, collectionView) directly to your viewControllers view, the large title will expand and collapse.
If you add any other non-scrolling view before adding the scrollView, the largeTitle will stay expanded.
i ended up doing something like
let view = UIView()
view.translatesAutoresizingMaskIntoConstraints = false
self.view.addSubview(view)
view.pinToEdgesOfSuperview()
self.view.addSubview(self.tableView)
self.tableView.pinToEdgesOfSuperview()
Not the most beautiful solution but it will work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With