自定义绘制的UITableViewCell中的辅助功能 [英] Accessibility in custom drawn UITableViewCell
问题描述
UITableViewCells的滚动速度在您进行自定义绘制时会大大提高,但是,可访问性中断了。
UITableViewCells scrolling speed increases dramatically when you do custom drawing, however, Accessibility breaks. How should one add accessibility support to a cell like this?
推荐答案
旧问题,但是iOS内置了对这种类型的支持。辅助功能。看一下 UIAccessibilityContainer
非正式协议,它将允许您在视图中定义rect并适当地标记它们。因此,如果您在0,0处绘制一个大X,尺寸为44x44,则可以将该矩形的accessibilityLabel设置为删除。
Old question, but iOS has built in support for this kind of accessibility. Take a look at the UIAccessibilityContainer
informal protocol which will allow you to define rects in your view and label them appropriately. Thus, if you draw a big X at 0,0 with a size of 44x44, then you can set the accessibilityLabel for that rect to "Delete".
这篇关于自定义绘制的UITableViewCell中的辅助功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!