How to shrink Large title when UICollectionView (inside horizontal CollectionView) scroll?
Asked Answered
C

0

6

I am using Brian's (LBTA) youtube demo to create Scrollable Horizontal MenuBar.

I am using collectionView.contentInsetAdjustmentBehavior = .never to avoid warnings in debug area.

I just want to add Large title which was introduced with iOS 11.

Set navigationController?.navigationBar.prefersLargeTitles = true to enable Large Title. And it is working well as expected.

Now, I want to shrink Large Title to normal title, when scrolling UIcollectionView (which is inside horizontal UICollectionView).

How to connect scrollView (inside UICollectionView's scroll) to NavigationController/NavigationItem to shrink?

enter image description here

Cispadane answered 14/8, 2018 at 10:51 Comment(4)
As i know Large title looks for the first scrollView in the view hierarchy. Bug first scroll view does not scroll vertically, so you can place dummy scrollView as a first scrollView in the view hierarchy and reflect the currently scrolling scrollViews's content inset and content size on it. Just an idea, maybe helps.Zweig
Great question JD. We just got stuck on it also. Did you solve it? We are pulling hairs..Infold
Do you have any update on this implementation?Holoblastic
No man. Hope SwiftUI will help usCispadane

© 2022 - 2024 — McMap. All rights reserved.