-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ScrollView partially hidden by navigation bar (large titles) #51
Comments
Hey! You can mention a user like this: @Mattesackboy. |
@BarredEwe I've tried to mention you, but without success because you were not on the discussion thread/a collaborator to the project. By the way thanks for your time ❣️ |
Hey @BarredEwe, I've tried to simulate this problem on a Test environment (because I'm sorry but I can't share the whole project where this bug is present) but unsuccessfully. init(layout: UICollectionViewLayout = UICollectionViewFlowLayout()) {
super.init(collectionViewLayout: layout)
if let layout = layout as? UICollectionViewFlowLayout {
layout.scrollDirection = .vertical
layout.sectionInset = .init(top: 16, left: 16, bottom: 16, right: 16)
layout.minimumInteritemSpacing = 0
layout.minimumLineSpacing = 16
layout.itemSize = .init(width: collectionView.frame.width - 16*2, height: 180)
}
} By removing the With section inset active (set to: IMG_1753.MP4Without section inset active: IMG_1754.MP4 |
I've also tried it on the simulator, and this bug doesn't happen on it. It happens only on real devices (such as my iPhone X) and only on iOS 14+ (this was not present last year on iOS 13, and we didn't update the app since then). |
I may have found a fix to this. Instead of setting the layout.sectionInset (UICollectionViewFlowLayout) top and bottom insets, I need to set the collectionView.contentInset instead. |
When we force refresh using the HeadRefresh (with NormalHeaderAnimator), when the scrollView populates with cells (in my case is a collectionView) the first cell is partially hidden behind the navigation bar, but after touching/scrolling the scrollView the collectionView automatically snaps itself on the correct position and the bug is gone.
After headRefresh finishes to load the data:
After touching/scrolling the collectionView:
Has anyone experienced this before? How can I fix it?
The text was updated successfully, but these errors were encountered: