I’m currently working on a project in iOS where I want the UItouch command to only send co-ordinates out when it’s over a certain “image”. I’ve got the co-ordinates outputting using UItouch but am not able to do this for just one specific area.
To my knowledge, the only way to do this is with views. So I’ve made a new view within my mainview, and from there I have problems and can’t seem to get it working.
Has anyone done this before/can give me any advice on this?
PS – I’m using Xcode 4.
Thanks in advance.
Try this out
EDIT: Or try using the
UITapGestureRecognizerIn your interface add the
UIGestureRecognizerDelegatethen in your viewDidLoad add this
then in your viewController add these 2 methods
And make sure you have
[yourImageView setUserInteractionEnabled:YES];