iOS 父View添加点击手势,CollectionView d
2022-06-23 本文已影响0人
d4d5907268a9
extension BottomActionSheetView :UIGestureRecognizerDelegate {
func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldReceive touch: UITouch) -> Bool {
guard let view = touch.view else {
return false
}
if view.isDescendant(of: self.cancelButton) {
return false
}
if view.isDescendant(of: self.conversation_collectionView) {
return false
}
if view.isDescendant(of: self.action_collectionView) {
return false
}
return true
}
}