AccessibilitySettings
Category: Structure
Platforms: iOS 14.0+, iPadOS 14.0+, Mac Catalyst 14.0+, macOS 11.0+, tvOS 14.0+, visionOS 1.0+, watchOS 7.0+
Overview
A structure for working with accessibility system settings.
Declaration
struct AccessibilitySettings
Details
Topics
- Opening the Settings app
- static func openSettings(for: AccessibilitySettings.Feature) async throws
- enum Feature
- Pausing animated images
- API ReferenceAnimated images
- static var animatedImagesEnabled: Bool
- static var animatedImagesEnabledDidChangeNotification: Notification.Name
- Customizing vertical text layout
- API ReferenceHorizontal text
- static var prefersHorizontalTextLayout: Bool
- static var prefersHorizontalTextLayoutDidChangeNotification: Notification.Name
- Supporting head-anchored content
- static var prefersHeadAnchorAlternative: Bool
- static var prefersHeadAnchorAlternativeDidChangeNotification: Notification.Name
- Reducing animation for text insertion indicators
- static var prefersNonBlinkingTextInsertionIndicator: Bool
- static let prefersNonBlinkingTextInsertionIndicatorDidChangeNotification: NSNotification.Name
- Checking if Assistive Access is running
- static var isAssistiveAccessEnabled: Bool
- Creating an accessibility settings structure
- init()
- static var prefersActionSliderAlternative: Bool
- static let prefersActionSliderAlternativeDidChangeNotification: NSNotification.Name
- static var showBordersEnabled: Bool
- static let showBordersEnabledStatusDidChangeNotification: NSNotification.Name
Relationships
- BitwiseCopyable
Accessibility Settings
Topics (Grouped)
Opening the Settings app
- funcopenSettings(for:AccessibilitySettings.Feature)asyncthrows — static; Opens the Settings app to a specific section of Accessibility settings.
- Feature — enum; Constants that describe specific Accessibility settings in the Settings app.
Pausing animated images
- Animated images — API Reference; Pause animations in animated images in your app when people turn off the Animated Images setting.
- varanimatedImagesEnabled:Bool — static; A Boolean value that indicates whether the system setting for playing animated images is on.
- varanimatedImagesEnabledDidChangeNotification:Notification.Name — static; A notification that posts when the system setting for playing animated images changes.
Customizing vertical text layout
- Horizontal text — API Reference; Lay out vertical text horizontally in your app when people turn on the Prefer Horizontal Text setting.
- varprefersHorizontalTextLayout:Bool — static; A Boolean value that indicates whether the system setting to prefer horizontal text for languages that support both vertical and horizontal text layout is on.
- varprefersHorizontalTextLayoutDidChangeNotification:Notification.Name — static; A notification that posts when the system setting to prefer horizontal text for languages that support both vertical and horizontal text layout changes.
Supporting head-anchored content
- varprefersHeadAnchorAlternative:Bool — static; A Boolean value that indicates the person’s preference for content that follows their head position.
- varprefersHeadAnchorAlternativeDidChangeNotification:Notification.Name — static; A notification that posts when the system setting for head-anchored content changes.
Reducing animation for text insertion indicators
- varprefersNonBlinkingTextInsertionIndicator:Bool — static; A Boolean value that indicates whether the system setting to prefer a nonblinking cursor in editable text fields is on.
- letprefersNonBlinkingTextInsertionIndicatorDidChangeNotification:NSNotification.Name — static; A notification that posts when the system setting to prefer a nonblinking cursor in editable text fields changes.
Checking if Assistive Access is running
- varisAssistiveAccessEnabled:Bool — static; A Boolean value that indicates whether Assistive Access is running.
Creating an accessibility settings structure
- init — ()
Type Properties
- varprefersActionSliderAlternative:Bool — static
- letprefersActionSliderAlternativeDidChangeNotification:NSNotification.Name — static
- varshowBordersEnabled:Bool — static
- letshowBordersEnabledStatusDidChangeNotification:NSNotification.Name — static
Conforms To
Code Examples
struct AccessibilitySettings
Source: https://developer.apple.com/documentation/accessibility/accessibilitysettings