Check if the CGPoint is inside the given view?
You can achieve this in a variety of ways.
-
UIView
pointInside
... It returns a boolean indicating whether the receiver contains the specified point.-(BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event
-
CGGeometry
CGRectContainsPoint
... It returns whether the rectangle contains the specified point.bool CGRectContainsPoint (CGRect rect, CGPoint point);
-
CGGeometry
CGPointEqualToPoint
method.It whether two points return equal.bool CGPointEqualToPoint (CGPoint point1, CGPoint point2);
source to share