I was wondering if there is an easy way to find out if there is a specific point in a specific CGRect?
I have this to find out where the user touched the screen:
UITouch *touch = [touches anyObject]; CGPoint currentPosition = [touch locationInView:self.view];
No. I would like to know if this point is in the following rectangle:
CGRect aFrame = CGRectMake(0, 100, 320, 200);
Obviously, the following does not work:
if (currentPosition = aFrame) {//do something}
I would be grateful for any help. Thank you very much!
source share