辅助功能:相关内容-两指轻弹

时间:2018-07-26 05:39:44

标签: accessibility uiaccessibility tvos11

TV OS Accessibility

我一直在尝试理解使用“两指向右滑动”的意图和潜在用例,如Apple TV上的“语音帮助”部分所述。到目前为止,我的理解是

  • 向右滑动两根手指可以使语音在没有移动系统焦点的情况下聚焦于其他无法聚焦的事物。
  • 如果有附加的屏幕截图,则用户可以获取焦点菜单选项的提示并了解有关该选项的更多信息(在这种情况下,它将是Apple TV徽标下的“两指向右滑动”。)

我一直在尝试寻找一个很好的用例,其中有人可能曾经使用过它,或者知道它的实现有关的任何文档。

enter image description here

到目前为止,这是我的代码在辅助功能属性方面的样子

func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
    guard let cell = tableView.dequeueReusableCell(withIdentifier: reuseIdentifier, for: indexPath) as? AccessibilityTableViewCell else {
        return UITableViewCell()
    }

    cell.titleLabel.text = "Main title for row \(indexPath.row)"
    cell.titleLabel.textColor = .black

    cell.isAccessibilityElement = true
    cell.accessibilityLabel = "Main title for row \(indexPath.row)"
    cell.accessibilityHint = "Hint for Main title at row for index \(indexPath.row)"
    cell.accessibilityTraits |= UIAccessibilityTraitStaticText

    return cell
}

还需要设置其他哪些内容以使提示标签成为第二行的相关内容?

0 个答案:

没有答案