Reputation: 12444
I have a subview on the screen that is loaded from a XIB, I need to disable touch events ONLY on its superview while not touching the subview in the end. How would I do this? Also, I am using iOS.
Thanks!
Upvotes: 0
Views: 1750
Reputation: 73688
This is how you can go about doing this -
Upvotes: 2
Reputation: 4279
In XIB, rather than using all other views as subview, u can just use superview at same level and set its usertouch interface as FALSE.
Upvotes: 1
Reputation: 163
I am also new to iphone development but htis piece of code helped me out when i tried to move only UIImage view.
you can apply cahnges on this code if you are using buttons or labels in your view.
if ([touch.view isKindOfClass:[UIImageView class]])
{
imageDemo.center = touchLocation;
}
Upvotes: 1