Reputation: 4891
I want to know whether I can get which cell was touched depending on the touch or pan location ?
I can get the touch easily but on touch of the view (mostly pan location) I have to reflect changes on the collection view behind it.
For touch location I am doing simple pan gesture like this :
@objc func panButton(pan: UIPanGestureRecognizer) {
if pan.state == .began {
} else if pan.state == .ended || pan.state == .failed || pan.state == .cancelled {
} else {
let location = pan.location(in: view)
}
}
}
Is this possible ? how ? or any alternative way ?
Upvotes: 0
Views: 38