title: iOS VoiceOver Button not Calling Target Method
body: <p>I have a UIButton subclass, ACTLanguageButton that really just does some custom UI changes so that I can reuse the style. In the subclass I have the following code relating to the accessibility:</p>
  
  <pre><code>- (BOOL)isAccessibilityElement {
      return YES;
  }
  
  - (NSString *)accessibilityLabel {
      NSLocale *locale = [NSLocale localeWithLocaleIdentifier:self.language];
      NSString *displayLanguage = [locale displayNameForKey:NSLocaleIdentifier value:self.language];
      return [NSString stringWithFormat:@"Language Preference: %@", displayLanguage];
  }
  
  - (NSString *)accessibilityHint {
      return @"Opens the list of available languages for accessible services.";
  }
  
  - (UIAccessibilityTraits)accessibilityTraits {
      return UIAccessibilityTraitButton;
  }
  </code></pre>
  
  <p>And in the UIView that instantiates and is the superview of the ACTLanguage Button:</p>
  
  <pre><code>self.languageButton = [[ACTLanguageButton alloc]initWithFrame:CGRectMake(self.frame.size.width - 120, 20, 120, 25)];
  [self addSubview:self.languageButton];
  [self.languageButton addTarget:self action:@selector(onLanguages) forControlEvents:UIControlEventTouchUpInside];
  </code></pre>
  
  <p>And then the method "onLanguages" itself which just shows a popup view that appears modally over the UIView:</p>
  
  <pre><code>- (void)onLanguages {
      [self.languagePopupView showWithCallback:nil];
  }
  </code></pre>
  
  <p>The button action works perfectly without VoiceOver enabled (normal tap-to-use). In addition, when I use the Accessibility Inspector on OS X with a simulator, the action gets performed just fine as well.</p>
  
  <p>On a real device (testing on an iPhone 5 running 9.3), the "onLanguages" method never gets called. The accessibility label, hint, and traits are read correctly, I can focus the element just fine, but the double-tap doesn't trigger the "onLanguages" method as expected.</p>
  
  <p>Any ideas?</p>