简体   繁体   中英

UICollectionView with sticky footer in iphone X, content scrolled to area below footer

In my UICollectionView , I made the following settings:

let flowLayout = collectionView?.collectionViewLayout as! UICollectionViewFlowLayout
flowLayout.sectionFootersPinToVisibleBounds = true
flowLayout.sectionInsetReference = .fromSafeArea 

However, on iPhoneX , the collectionView content will scroll to area under the sticky footer as shown in collection View in iphone X with sticky footer

Can anyone give any ideas? Thanks!

Set scroll view content insets to Never

集合视图大小检查器

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM