Post

Replies

Boosts

Views

Activity

Reply to Background Decoration View Overlapping Collection View Cells
DecorationItemView without blocking gestures: override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? { let view = super.hitTest(point, with: event) if view == self { return nil } return view } And change layer.zPosition when willDisplaySupplementaryView: func collectionView(_ collectionView: UICollectionView, willDisplaySupplementaryView view: UICollectionReusableView, forElementKind elementKind: String, at indexPath: IndexPath) { //.... if #available(iOS 18.0, *) { view.layer.zPosition = -5 } }
Topic: UI Frameworks SubTopic: UIKit Tags:
Sep ’24