setting an accessibilityLabel on a UIImageView contained in UITableView header

后端 未结 3 2219
Happy的楠姐
Happy的楠姐 2021-02-08 10:43

I have a UITableView that I build in loadView. One of the things I do in loadView is create a UIView to act as the table head

3条回答
  •  我寻月下人不归
    2021-02-08 10:57

    Voice-Over sometimes can get nasty and just by setting isAccessibilityElement might not work.

    In this case try setting accessibilityElements on the parent view and include the child views in the array, like this:

    parentView.accessibilityElements = [childView1, childView1, childView1]
    

    Doing it also ensures that the accessibility items are being read in the order you want.

提交回复
热议问题