您的位置:首页 > 产品设计 > UI/UE

【UIKit】-3-UIAccessibility - 元素可访问性,辅助功能

2015-07-22 10:22 411 查看
1官方文档(元素可访问性,辅助功能,演示功能)

The UIAccessibility informal protocol provides accessibility information about an application’s user interface elements. Assistive applications, such as VoiceOver, convey
this information to users with disabilities to help them use the application. Standard UIKit controls and views implement the UIAccessibility methods and are therefore accessible to assistive applications by default. This means that if your application uses
only standard controls and views, such as UIButton, UISegmentedControl, and UITableView, you need only supply application-specific details when the default values are incomplete. You can do this by setting these values in Interface Builder or by setting the
properties in this informal protocol. The UIAccessibility informal protocol is also implemented by the UIAccessibilityElement class, which represents custom user interface objects. If you create a completely custom UIView subclass, you might need to create
an instance of UIAccessibilityElement to represent it. In this case, you would support all the UIAccessibility properties to correctly set and return the accessibility element’s properties.

该UIAccessibility非正式协议提供有关应用程序的用户界面元素的辅助功能信息。辅助应用,如VoiceOver会,传达这一信息给用户残疾人,帮助他们使用的应用程序。标准UIKit的控件及视图实现UIAccessibility方法,因此访问辅助应用程序默认。这意味着,如果你的应用程序只使用标准的控制和看法,如UIButton的,UISegmentedControl和UITableView中,你只需要提供应用程序的具体细节时,默认值是不完整的。您可以通过设置在Interface
Builder这些数值,或者在这种非正式的协议设置的属性做到这一点。所述UIAccessibility非正式协议也由UIAccessibilityElement类,它代表自定义用户界面对象来实现。如果您创建一个完全自定义的UIView子类,你可能需要创建UIAccessibilityElement的实例来代表它。在这种情况下,你会支持所有UIAccessibility属性正确设置并返回辅助元素的属性。

1、UIAccessibility协议用于让外界程序了解到自己身的执情情况。Accessibility是一个交互协议,基于查询<->应答,通知<->监听模型的协议。外部程序通过查询来获取APP应答,从而了解程序。另外通过监听来自APP的消息,来通知用户当前状态。

 2、常用的协议与元素包括:

  1)UIAccessibility, protocol,核心协议。

  2)UIAccessibilityAction,protocol,添加行为的协议。

  3) UIAccessibilityElement, class。

  4)UIAccessibilityContainer,protocol,容器协议。

 3、常用函数 UIAccessibilityPostNotification。

未完待续

参考文献 http://www.tuicool.com/articles/Mb6n2m http://www.apple.com/accessibility/ios/ https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/iPhoneAccessibility/Accessibility_on_iPhone/Accessibility_on_iPhone.html http://www.51testing.com/html/54/n-843354-3.html http://blog.jobbole.com/63106/ http://wenku.baidu.com/link?url=9NcuXYANjiXxYiYq51DPApelMpKLJ5yWTBsu6WkS_IxgOS2rNFxCcwdQIbb-WjlpWt6zKOj9WhfG3ppYWSrBCoz9NqV5JCa-rILUNTQZFQq
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: