Anyone? This is one of the last steps of polish of my Catalyst app that I would like to implement, but I just don't see what's going wrong.
Based on these docs: https://developer.apple.com/documentation/swiftui/view/focusable(_:interactions:)
The focus interactions allowed for custom views changed in macOS 14—previously, custom views could only become focused with keyboard navigation enabled system-wide. Clients built using older SDKs will continue to see the older focus behavior, while custom views in clients built using macOS 14 or later will always be focusable unless the client requests otherwise by specifying a restricted set of focus interactions.
It reads to me like this should be possible with macOS 14 or later?
Essentially what I want is similar to the behavior in Reality Composer Pro where when the user clicks the scene view keyboard controls are enabled to move around in the scene, whereas when focus changes e.g to elements on the sidebar keyboard navigation will cycle between them.
What works in my example above is using the arrow keys right away to focus the way. Although then I only get the focus ring, but the isFocused FocusState still does not update. Very confusing.
This video also didn't help much: https://developer.apple.com/documentation/swiftui/focus-cookbook-sample
Is this just somewhat unfinished behavior specific to Mac Catalyst?
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: