Here is a UIView, which is the yellow rectangle, and I override the drawRect: method to draw the red area, and I added the UITapGesture etc. but I just wanna to respond the red area, if the user click inside the yellow rectangle, but not on the red area, I will not respond it. Do I need to manually get the position and calculate whether it is inside the scope? Any smartier way to do so? Thanks.