AXCustomContent
Category: Class
Platforms: iOS 14.0+, iPadOS 14.0+, Mac Catalyst 14.0+, macOS 11.0+, tvOS 14.0+, visionOS 1.0+, watchOS 7.0+
Overview
Objects that define custom content and the timing of its output.
Declaration
class AXCustomContent
Details
Topics
- Creating custom content
- convenience init(attributedLabel: NSAttributedString, attributedValue: NSAttributedString)
- convenience init(label: String, value: String)
- init?(coder: NSCoder)
- Defining custom content
- var label: String
- var attributedLabel: NSAttributedString
- var value: String
- var attributedValue: NSAttributedString
- var importance: AXCustomContent.Importance
- enum Importance
Relationships
- NSObject
- CVarArg
- CustomDebugStringConvertible
- CustomStringConvertible
- Equatable
- Hashable
- NSCoding
- NSCopying
- NSObjectProtocol
- NSSecureCoding
See Also
- Custom accessibility content
- protocol AXCustomContentProvider
- typealias AXCustomContentReturnBlock
AXCustom Content
Overview
An AXCustomContent object contains the accessibility strings for the labels you apply to your accessibility content. Combine them with the AXCustomContentProvider protocol to allow your users to experience the content in a more appropriate manner for each assistive technology.
Topics (Grouped)
Creating custom content
- init(attributedLabel:NSAttributedString,attributedValue:NSAttributedString) — convenience; Creates new custom content with an attributed string and attributed value.
- init(label:String,value:String) — convenience; Creates new custom content with a label and value.
- initcoder:NSCoder) — ?(
Defining custom content
- label:String — var; A localized string that identifies the label for this content.
- attributedLabel:NSAttributedString — var; A localized attributed string that identifies the label for this content.
- value:String — var; A localized string that provides a value for the label.
- attributedValue:NSAttributedString — var; A localized attributed string that provides a value for the label.
- importance:AXCustomContent.Importance — var; An object that determines when to output custom accessibility content.
- Importance — enum; Objects that control the timing of content output.
Inherits From
Conforms To
- CVarArg
- CustomDebugStringConvertible
- CustomStringConvertible
- Equatable
- Hashable
- NSCoding
- NSCopying
- NSObjectProtocol
- NSSecureCoding
Custom accessibility content
- AXCustomContentProvider — protocol; The interface for customizing the accessibility content.
- AXCustomContentReturnBlock — typealias
Code Examples
class AXCustomContent
Source: https://developer.apple.com/documentation/accessibility/axcustomcontent