I have ViewController with the CollectionView in it. I want to change CollectionView insets by pressing button. What code I should imp
ViewController
CollectionView
Set the section inset and invalidate the layout.
let collectionViewLayout = collectionView.collectionViewLayout as? UICollectionViewFlowLayout collectionViewLayout?.sectionInset = ... // some UIEdgeInset collectionViewLayout?.invalidateLayout()