【发布时间】:2021-03-15 10:31:29
【问题描述】:
我正在尝试将 accessibilityUserInputLabels 分配给 UIBarButtonItem 以进行语音控制以显示特定名称;请参阅下面的代码。
/// Button
lazy var groupButton: UIBarButtonItem = {
var button = UIBarButtonItem(imageName: "FunctionGroup1", target: self, action: #selector(barButtonHandler))
button.accessibilityLabel = "Goodbye!"
button.accessibilityUserInputLabels = ["Hello!"]
return button
}()
但是按钮只显示按钮的accessibilityLabel,而不是accessibilityUserInputLabels。
我使用的是 iOS 14 和 Xcode 12.4。
我错过了什么?
2021 年 5 月 11 日编辑:问题已报告给 Apple;见this。
【问题讨论】:
标签: accessibility uibarbuttonitem