辅助功能accessibilityDecrement()未被调用

时间:2018-02-02 14:52:39

标签: ios swift uitextview accessibility

为什么在执行适当的手势时,我的自定义UITextView中没有调用accessibilityDecrement()和accessibilityIncrement()?

{{1}}

2 个答案:

答案 0 :(得分:0)

尝试:

isAccessibilityElement = true

accessibilityTraits = super.accessibilityTraits | UIAccessibilityTraitAdjustable

答案 1 :(得分:0)

My bad. Turns out I had forgotten that I was setting textView.accessibilityTraits = UIAccessibilityTraitStaticText in the ViewController.viewDidLoad. Duhh...