I have a sublayer on a layer-backed view. The sublayer\'s contents are set to an Image Ref and is a 25x25 rect.
I perform a hit test on the super layer when the touchesBega
The accepted answer does not solve the problem, but the answer by schwa does.
I have a window, a view controller and view. The view receives touches and calls hitTest:
on its layer. I had the same problem and found out that the point in the view is correct, but in hitTest:
the y coordinate of the point is 20px off, which happens to be the height of the status bar.
By mapping the point to the coordinate system of the superlayer as suggested by schwa this problem is fixed. The "mysterious" superlayer is the root layer of the superview. In my case, it is the window layer (frame (0, 0, 320, 480)).