gpt4 book ai didi

ios - 推送新 View Controller 时如何让语音读出标题?

转载 作者:可可西里 更新时间:2023-11-01 04:00:15 25 4
gpt4 key购买 nike

在设置应用程序中,如果我双击“常规”行。它插入通用 View Controller 。然后它说

"General"

(当前 View Controller 的名称)

然后

"Settings, back button"

(所选项目的名称)

但是在我的自定义 self.navigaitonItem.titleView 应用程序中,它只显示

"Home, Back Button"

如何让它读出屏幕的名称? (我厌倦了设置self.title)

最佳答案

我还没有测试过,但您可能需要检查 View 的 accessibilityLabel 属性。来自文档:

By default, standard UIKit controls and views have labels that derive from their titles. If you provide a custom control or view, however, you need to set this property appropriately so that assistive applications can supply accurate information to users with disabilities.

关于ios - 推送新 View Controller 时如何让语音读出标题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36990907/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com