Tap Gesture not working as expected when added to uiview in collectionview cell
问题 I am adding a tap gesture recognizer programmatically to a custom collection view cell class. for some reason, it doesnt seem to be working. the frame is not 0, isUserInteractionEnabled is set to true and i made sure the tap view is on top of all other views: The custom cell class: let containerView: UIView = { let view = UIView() view.isUserInteractionEnabled = true view.translatesAutoresizingMaskIntoConstraints = false return view }() let tapView: UIView = { let v = UIView() v