efremidze / Haptica

Easy Haptic Feedback Generator 📳
MIT License
770 stars 42 forks source link

Usage in table view? #19

Open danqing opened 4 years ago

danqing commented 4 years ago

Thanks for this great library!

I'm trying to use it in a table view, and I have the following code:

func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
  Haptic.impact(.medium).generate()
  // Other stuff...
}

This generates haptic feedback, but sometimes it seems to be generating two very fast consecutive ones. It happens when you click on one cell and then another.

Is it the wrong way to use the library? Thank you!