Skip to content

Instantly share code, notes, and snippets.

@externvoid
Created November 18, 2015 08:08
Show Gist options
  • Save externvoid/80e8444912f6a77bf8c1 to your computer and use it in GitHub Desktop.
Save externvoid/80e8444912f6a77bf8c1 to your computer and use it in GitHub Desktop.
tableview cell sensitivity
わりと何度もこの問題にはぶつかっていて、
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
で解決するという話も見かけた。
今回は、これらが無くても改善したので一応メモとして残しておく。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment