I'm trying to detect if a UIView inside of another view is touched. I have something like this:
But it never detects it. Do I need to do something else? I could call touchesMoved within the subview, but then I can't detect if the touch moves outside the view. Any suggestions? Any advice is greatly appreciated!
Code:
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch=[touches anyObject];
if([touch view]==myview]){
//Do this code...
}
}