LoginSignup
22
20

More than 5 years have passed since last update.

UITableViewCellの上にあるViewのタップ感度が悪い

Posted at

わりと何度もこの問題にはぶつかっていて、

tableView.delaysContentTouches = false

だよね。と思っていたんだけど、今回はこれだけではダメだった。

解決した方法

tableView.delaysContentTouches = false

for case let v as UIScrollView in tableView.subviews {
    v.delaysContentTouches = false
}

どうやらsubviewの中にもUIScrollViewがいたらしい。

色々調べていて

tableView.canCancelContentTouches = false

とか

tableView.panGestureRecognizer.delaysTouchesBegan = false

で解決するという話も見かけた。

今回は、これらが無くても改善したので一応メモとして残しておく。

22
20
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
22
20