Reputation: 12663
I have an app with a target of iOS 5.0. Unfortunately, I no longer have any test devices with iOS 5.
I'd like to be able to use the iOS 5.0 and 5.1 simulators to do basic debugging, but for some reason, my IBAction
s aren't being called on these simulators.
Further info:
Xcode version is 4.5.2
All simulators are up-to-date (no pending updates/downloads available)
We do have customers who use iOS 5 and 5.1, and they don't have any issues clicking the buttons (or at least, we haven't received any reports about such from them ; )
On the iPhone 6.0 simulator, everything works as expected (pretty sure all IBActions
are connected correctly)
Are these simulators just terribly buggy (is this a known issue)? Have others ran into this issue and know a fix?
Upvotes: 0
Views: 830
Reputation: 7371
Use UIGestureRecognizerDelegate to avoid effect of gestureRecognizer on a selectedView:
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)recognizer shouldReceiveTouch:(UITouch *)touch {
UIView *selectedView = self.view;
CGPoint point = [touch locationInView:self.view.superview];
if (CGRectContainsPoint(selectedView.frame, point)) {
return NO;
}
else {
return YES;
}
}
Upvotes: 0
Reputation: 12663
It turns out that a UITapGesture
on self.view
was capturing the touches and NOT forwarding to the subviews... for some reason, this behavior appears to be different in iOS 6 and iOS 5 simulators... user beware...
Upvotes: 2
Reputation: 49730
Most Probably issue i seen that..
IBAction
method in .h file.IBAction
on one UIButton
TouchUpInside
.Xcode
then you try to run your app then you got solution. I am working on same configuration and i have no issue like yours..
Upvotes: 1