In UIKit you can create keyboard shortcuts by overriding the keyCommands for your view controller, which is an array of UIKeyCommand. A bit of a different approach to how you'd do it with SwiftUI.

In UIKit you can create keyboard shortcuts by overriding the keyCommands for your view controller, which is an array of UIKeyCommand. A bit of a different approach to how you'd do it with SwiftUI.


Adding keyboard shortcuts in your SwiftUI apps is extremely easy. Just use the .keyboardShortcut(_:) modifier. When pressing and holding the command key, the shortcut will appear in the shortcuts list.

In UIKit, to create an adjustable component we need to add the adjustable trait and override both accessibilityIncrement() and accessibilityDecrement(). In SwiftUI, everything you need is bundled in the accessibilityAdjustableAction(_:) modifier.

Make sure you support Dynamic Type up to the largest text size available. Take into account that there are five extra accessibility sizes available from the Accessibility Settings. It can make a huge difference for lots of users.
Content © Daniel Devesa Derksen-Staats — Accessibility up to 11!