var isAccessibilityElement : Bool
var accessibilityValue : String?
var accessibilityHint : String?
var accessibilityTraits : UIAccessibilityTraits
struct UIAccessibilityTraits
Availability
Technology
var accessibilityLabel: String
? { get set }
The default value for this property is nil
unless the element is a UIKit control, in which case, the value is a label that derives from the control’s title.
Note 注意
If you supply UIImage
objects to display in a UISegmented
, set this property on each image to ensure that the segments are properly accessible.
If you implement a custom control or view, or if you display a custom icon on a UIKit control, set this property to make sure your accessibility elements have appropriate labels. If an accessibility element doesn't display a descriptive label, set this property to supply a short localized label that succinctly identifies the accessibility element. For example, a “Play music” button might display an icon that indicates what it does to sighted users. To be accessible, however, the button needs the accessibility label Play or Play music so that an assistive app can provide this information to users with disabilities. Note that the label never includes the control type (such as button) because the traits of the accessibility element contain that information.
var isAccessibilityElement : Bool
var accessibilityValue : String?
var accessibilityHint : String?
var accessibilityTraits : UIAccessibilityTraits
struct UIAccessibilityTraits