I need to know if a point is inside at lease one of the views in a given set of views. For that, I used UIView's pointInView method, but it always returns NO. As an act of despair, I checked if the view's center point is inside the view and it also returned NO. This is the code I've used for that:
BOOL wasPointFound = NO;
NSArray *views = [view subviews];
for (UIView *curView in views)
{
if ([curView pointInside:curView.center withEvent:nil])
{
wasPointFound = YES;
break;
}
}
if (!wasPointFound)
NSLog(@"NO");
else
NSLog(@"YES");
Can anybody please tell me what I'm doing wrong?
Thanks,