accessibilityActivate() lets you capture a VoiceOver double tap. This is useful if you are creating a custom component you interact with using complex gestures or VoiceOver navigation gestures. An example: slide to unlock.

https://developer.apple.com/documentation/objectivec/nsobject-swift.class/accessibilityactivate()

The classic Slide to Unlock component used in iOS for unlocking your device, in the first iOS versions, required sliding a button with an arrow to the right. This clashed with a flick to the right gesture used with VoiceOver to navigate to the next item. It would try to find the next element on screen instead of unlocking the device and it would play a sound indicating you’ve reached the end of the screen. So you could double tap to activate instead. This can be achieved by overriding accessibilityActivate() in the slide to unlock component.

You may also find interesting...

An accessibility trait is the role of the component. Among other things, it gives the user information on how they can interact (or not) with it. When using VoiceOver, the trait is usually (not always) read after the accessibility label. At the time of writing this tweet, there are 18 different accessibility traits: https://developer.apple.com/documentation/uikit/uiaccessibilitytraits Some examples are: button, header, selected, adjustable or not enabled.

You don't have to offer an alternative layout just for the accessibility category. You can actually compare content size categories. So you could tweak the UI already for anything equal to or larger than .extraExtraLarge, for example.

UINotificationFeedbackGenerator has a “success” feedback type. Consider using it when a task was performed successfully together with any other visuals or sound. The use of multiple modes just makes it easier for everyone to understand your app.

Created in Swift with Ignite.

Supporting Swift for Swifts