title: How to detect if the touch point is contained by draw content of CALayer?
body: <p>There are three layers added to UIView. One layer draws a rectangle. One draws a circle. One draws a polygon. The layer's opacity is no. When I touched the polygon, I want to get the correct layer which draws the polygon. And the three layers are full filled to the view. I have implemented this. But I don't know if we have better solution to solve it .My way is like this:
  1.Drawing the content using -drawLayer:inContext. store the CGPath that you used.
  2.In the UIView's -touchedEnded:withEvent method. using CGPathContainsPoint() to detect if the touch point is contained by the CGPath.</p>
  
  <p>Maybe this is the stupid way to solve this. Anyone who can tell me how to solve it better?</p>