0
我想我并不完全了解containsPoint方法:为什么此CGRectContainsPoint失败?
// test
CGRect compareRect = CGRectMake(-39, -62, 39, 62);
CGPoint comparePoint = CGPointMake(3, -27);
if(CGRectContainsPoint(compareRect, comparePoint)) NSLog(@"works");
else NSLog(@"doesn't work");
当我绘制它的点是在矩形内。但它返回“不起作用”。
我不包含那一点=) – Nekto 2011-12-18 19:20:42
我在坐标思考。 3是> -39 && 3 < 39 && -27 > -62 && -27 <62.对我来说是漫长的一天。 =) – TigerCoding 2011-12-18 19:23:43