Quote:
Originally Posted by evana
Hello everyone. I am very new in in this development field.In my application i have an image of a road i want to touch this image if i touch outside of the road image its alert me but i dont know the touch function of UIImage can any one help me about this.
|
You can just use touchesEnded, then just check if the touch occurred on the road or not.
Code:
-(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{
UITouch *touch = [touches anyObject];
if(touch.view == myRoadView){
...
}
}