How to get voice over to read out title when new view controller is pushed?

萝らか妹 提交于 2019-12-01 16:57:40

问题


In the setting app if I double tap on the 'General' row. It pushes the the general view controller. It then says

"General"

(The name of the current view controller)

Then

"Settings, back button"

(The name of the selected item)

However in my app with a custom self.navigaitonItem.titleView it only says

"Home, Back Button"

How do I get it to read out the name of the screen? (I tired to set self.title)


回答1:


I havent tested it but you might need to check out the accessibilityLabel property of the view. From documentation:

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.



来源:https://stackoverflow.com/questions/36990907/how-to-get-voice-over-to-read-out-title-when-new-view-controller-is-pushed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!