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
When I try your code, I get almost-correct behavior, except touches are often not recognized on the very edge of the sublayer. I am a bit confused as to what's going on. You might want to try doing something like when you register a touch, throw a new tiny layer up where the touch occurred (like a 5x5 square of some color) and then remove it again 3 seconds later. That way you can track where CA thinks the touch occurred versus where your cursor actually is.
BTW, you don't need to create a CGImage for your blue content, you can just set the layer's backgroundColor
to [UIColor blueColor].CGColor
.