I have two buttons in a subclass of UIControl
. I am dragging one of the two using a gesture recognizer and when panGestureRecognizer.state==UIGestureRecognizerStateEnded
I want to check if the center of my second button is inside the frame of the button I have just dragged. Apparently, for some reason, [btnDragged pointInside: btn2.center withEvent:nil]
doesn't ever return YES
.
Is there any other solution? (I know I can work with coordinates and check directly, but I don't want to write too much code)