Files
AsyncDisplayKit/_docs/hit-test-slop.md
Hannah Trosi fc88b8ccac website refactoring
clean up optimization docs
rearrange sections in nav bar
add layout api sizing Q to FAQ
add corner rounding to Optimizations + check back soon tags for methods to be released in 2.0
add layoutSpecs
Containers overview -> node containers
Node overview -> node subclasses
remove ASTextCellNode
2016-07-10 22:52:58 -07:00

968 B
Executable File

title, layout, permalink, prevPage, nextPage
title layout permalink prevPage nextPage
Hit Test Slop docs /docs/hit-test-slop.html layoutSpecs.html batch-fetching-api.html

ASDisplayNode has a hitTestSlop property of type UIEdgeInsets that when set to a non-zero inset, increase the bounds for hit testing to make it easier to tap or perform gestures on this node.

ASDisplayNode is the base class for all nodes, so this property is available on any of AsyncDisplayKit's nodes.

Note:

  • the default value is UIEdgeInsetsZero
  • This affects the default implementation of `-hitTest` and `-pointInside`, so subclasses should call super if you override it and want hitTestSlop applied.

A node's ability to capture touch events is restricted by its parent's bounds + parent hitTestSlop UIEdgeInsets. Should you want to extend the hitTestSlop of a child outside its parent's bounds, simply extend the parent node's hitTestSlop to include the child's hitTestSlop needs.