iOS CGRectContainsPoint的用法

判断给定的点是否被一个CGRect包含,可以用CGRectContainsPoint函数

    CGPoint point = [touch locationInView:self];

    if(CGRectContainsPoint(CGRectMake(55, 40, 30, 35), point)){

//如果这个点在CGRect里面

}

原文地址:https://www.cnblogs.com/liuting-1204/p/6000230.html