Answer for Objective-C and Swift2.0: How to center align the cells of a UICollectionView?
I usually would try to conver
The method that you are looking for is present with a different signature in Swift 3. The new signature is this:
optional public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets
P.S: This method is present in UICollectionViewDelegateFlowLayout protocol.
Hope this would help.