Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ShoMasegi/1a90ccfb379ddb88c007814cb2147bf1 to your computer and use it in GitHub Desktop.
Save ShoMasegi/1a90ccfb379ddb88c007814cb2147bf1 to your computer and use it in GitHub Desktop.
private func layoutItems(...) {
....
let layoutAttributes = UICollectionViewLayoutAttributes(forCellWith: indexPath)
layoutAttributes.frame = CGRect(
x: offsetX,
y: offsetY,
width: itemWidth,
height: itemHeight
)
allItemAttributes.append(contentsOf: itemsLayoutAttributes)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment