Last active
March 13, 2020 03:23
-
-
Save fahied/c30d18a17e487dc6630f to your computer and use it in GitHub Desktop.
Set Accessibility to custom UITableViewCell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In Voice-Over , in order to make an element accessible :- | |
1. you have to set setIsAccessibilityElement property as true which i don't find in your code. | |
2; The other important point is that to make child elements (subviews) to be accessible , you have to seperately make them accessible while the parent should not be accessible(you have to specify this also). | |
Implement the UIAccessibilityContainer Protocol in your custom - cell. | |
NSString *title = titleofcell; | |
cell.accessibilityValue = title; | |
cell.accessibilityLabel = [NSString stringWithFormat:@"item %ld", (long)indexPath.row]; | |
cell.accessibilityTraits = UIAccessibilityTraitButton; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment