UIView exclusiveTouch doesn't work in Debug build configuration?

Just figured out an issue we are having in testing was only happening on "debug" builds (ie default Run scheme to an attached device). It appears UIView's exclusiveTouch setting is not respected by the system on at least objective C debug builds (latest Xcode). No such issue when the Run scheme build config is set to "release".

Has anyone run into this before? Is this a new Xcode/SDK bug? I feel like our QA processes would have picked this up before, but who knows...

Figured I'd ask here before chasing this further.

Thanks, E.

Answered by stackeria in 770013022

Ok I figured it out. Problem fixed. This has nothing to do with debug or release build configuration. UIView in question has children views that have userInteraction enabled only in debug mode. In both debug and release, the touch events are handled by the parent. I guess exclusiveTouch needs to be set on the view in the hierarchy that first intercepts the touch events even if it passes them up. In our case that's the parent in release mode but the child in debug.

Accepted Answer

Ok I figured it out. Problem fixed. This has nothing to do with debug or release build configuration. UIView in question has children views that have userInteraction enabled only in debug mode. In both debug and release, the touch events are handled by the parent. I guess exclusiveTouch needs to be set on the view in the hierarchy that first intercepts the touch events even if it passes them up. In our case that's the parent in release mode but the child in debug.

UIView exclusiveTouch doesn't work in Debug build configuration?
 
 
Q