setIsAccessibilityElement not working in UITableViewCell

2.9k Views Asked by At

I have a plain UITableViewCell whose label I set and I also set isAccessibilityElement to FALSE. However voiceover still speaks the label when it has focus. What am I doing wrong?

3

There are 3 best solutions below

0
On

Set the accessibilityElementsHidden to YES instead.

0
On

For UITableViewCell: You need to implement the isAccessibilityElement method of the UIAccessibility protocol in the implementation of your custom subclass.

- (BOOL)isAccessibilityElement{
   return NO;
}

For more details, go through below link: https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/iPhoneAccessibility/Making_Application_Accessible/Making_Application_Accessible.html

0
On

try this inside the cell class.

self.contentView. isAccessibilityElement = NO;