背景:
自己写了一个小demo,在截图的时候会刷新CollectionViewCell,导致刷新后CollectionViewCell会向上偏移
解决办法:
在cell所在的tableView/collectionView中添加添加这个属性(swift代码),
collectionView.contentInsetAdjustmentBehavior = UIScrollView.ContentInsetAdjustmentBehavior.never
自己写了一个小demo,在截图的时候会刷新CollectionViewCell,导致刷新后CollectionViewCell会向上偏移
在cell所在的tableView/collectionView中添加添加这个属性(swift代码),
collectionView.contentInsetAdjustmentBehavior = UIScrollView.ContentInsetAdjustmentBehavior.never