JRG-Developer
JRG-Developer

Reputation: 12663

iPhone 5.0 and 5.1 Simulators Not Calling IBActions?

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 IBActions aren't being called on these simulators.

Further info:

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

Answers (3)

KONG
KONG

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

JRG-Developer
JRG-Developer

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

Nitin Gohel
Nitin Gohel

Reputation: 49730

Most Probably issue i seen that..

  • might be you not define your IBAction method in .h file.
  • might be you connect two IBAction on one UIButton TouchUpInside.
  • you also try uninstall app from simulatore clear xcode than might be solve your issue.
  • reset you simulator contain.
  • Check is any update of 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

Related Questions