Skip to content

Flipped CollectionView (Chat) #27

@beamercola

Description

@beamercola

This pod looks great, super clean. I'm having an issue with a flipped collectionview and cell (chat app) though and not sure why.

I've tried both:

let layout = BouncyLayout()
collectionView = UICollectionView(frame: .zero, collectionViewLayout: layout)
collectionView!.transform = CGAffineTransform.init(rotationAngle: (-(CGFloat)(Double.pi)))
// ...

func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
  // ...
  cell.transform = CGAffineTransform(rotationAngle: CGFloat.pi)
  return cell
}

and

let layout = BouncyLayout()
collectionView = UICollectionView(frame: .zero, collectionViewLayout: layout)
collectionView!.transform = CGAffineTransform(a: 1, b: 0, c: 0, d: -1, tx: 0, ty: 0)
// ...

func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
  // ...
  cell.transform = collectionView.transform
  return cell
}

Both create different results. Any ideas? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions