Custom UITableViewCell accessibility

前端 未结 4 1919
别那么骄傲
别那么骄傲 2021-02-13 23:09

How can you set the accessibility of subviews of UITableViewCells individually.
It should not be accessible as complete cell?

4条回答
  •  忘了有多久
    2021-02-13 23:58

    I tried every solution proposed here, but none of those solved my issue.

    I was able to hide my cell from accessibility and highlight only the elements from my UITableViewCell by setting the cell's contentView.accessibilityElementsHidden to true and also setting my UI items isAccessibilityElement to true.

    contentView.accessibilityElementsHidden = true
    
    UIElement.isAccessibilityElement = true
    

提交回复
热议问题