views:

192

answers:

1

I have created a few UIImageViews programmatically, but I have a feeling that even though I setMultipleTouchEnabled to YES during the setup, it is not getting set properly and it's leading to multi-touch issues.

My question is, within touchesBegan how do I go about asking the UIImageView that was touched if it has MultipleTouchEnabled or not?

I am fairly new to this so I'm really stumbling through code and learning as I go (with your help of course).

Thank you ahead of time!

+2  A: 

multipleTouchEnabled is a property of UIView, so you can check it using the dot syntax for property access by something like:

if (aView.multipleTouchEnabled) { NSLog(@"multipleTouch is Enabled"); }
David Gelhar
so by doing something like this within touchesBegan?for (UITouch *touch in touches) { UIView *newView = [touch view];if (newView.multipleTouchEnabled) { NSLog(@"multipleTouch is Enabled"); }}
iWasRobbed
You can make the log more detailed if you want and see which subviews have multi touch enabled: NSLog(@"multipleTouch enabled in %@", newView);
progrmr
Perfect, thank you guys! Works great
iWasRobbed