Peter Steinberger 1/31/2021

Fixing keyboardShortcut in SwiftUI

Read Original

This technical article investigates a bug in SwiftUI's keyboardShortcut modifier, which fails to work in iOS 14 apps using a UIKit lifecycle. The author details their debugging process, identifies the specific failing scenario, and provides a verified workaround involving UIHostingController and its internal keyboardShortcutBridge. The content includes code examples and low-level analysis using LLDB and Hopper.

Fixing keyboardShortcut in SwiftUI

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser