1
我UICollectionView停止滾動後處理自來水UICollectionView不能選擇
DidSelect不滾動後不再叫
override func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
print("didSelectItemAt")
}
}
細胞也滾動後不叫內部的姿態:
override open func awakeFromNib() {
// Initialization code
let tapUpInside = UITapGestureRecognizer.init(target: self, action: #selector(MainCollectionViewCell.tapPressButtonUP(_:)))
let longPress: UILongPressGestureRecognizer = UILongPressGestureRecognizer.init(target: self, action: #selector(MainCollectionViewCell.longPressButton(_:)))
longPress.delegate = self;
longPress.cancelsTouchesInView = false;
self.addGestureRecognizer(longPress)
}