The weirdest thing happened with touchesMoved. I have it declared like this:
The code executes when I start outside of the image and move to the image yet strangely doesn't work when I start inside the image and move. Has anyone else experienced anything like this?
Code:
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch = [touches anyObject];
if ([touches count]==1){
if (CGRectContainsPoint([imageView frame], [touch locationInView:MyView])) {
//The code to be executed...
}
}
}