Hey all,
I'm having a strange issue where a custom control I've built for the iPhone works perfectly when building in debug mode but only works partially when built in release mode.
The main wrapper view is a subclass of UIView and it contains a row of "buttons" that are added as subviews. The custom button class extends UIImageView and is overriding the touch methods with the following signatures:
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
When building debug code, all 4 of these functions are called at the times you would expect, with a release build, nothing happens. I have logging in each of them and I'm not getting any log messages (other logging is working).
Another interesting thing, I have the touchesBegan/Moved/Ended methods overridden in the wrapper view class and they are working fine. I've tried commenting out those methods in the wrapper class to see if it had an effect on the buttons but it did not.
I've also tried changing the UIImageView class to be a subclass of UIButton instead but am having the same issue there, including any events like touchUpInside. They work in debug, but not release.
I've tried researching this issue as well as general event handling and have come up empty handed. Any ideas where to look next?