Hi everyone,
I'm working on a tvOS app using SwiftUI, and I want to disable the focus effect (the default focus glow/bounce) on a specific Button. According to the documentation:
/// - Parameter disabled: A Boolean value that determines whether this view /// can display focus effects. /// - Returns: A view that controls whether focus effects can be displayed /// in this view.
I used .focusEffectDisabled(true) on the Button, expecting the focus style to be completely disabled for that view. However, this doesn’t seem to have any effect in my tvOS 17+ app – the button still shows the default focus visual effect when focused.
Here’s a simplified example:
Button("Click Me") { // action } .focusEffectDisabled(true)
This still shows the bounce/glow focus effect. Am I missing something, or is this a bug?
Has anyone managed to fully disable the focus effect for a view (especially Button) in tvOS using SwiftUI? Any workarounds or additional modifiers I should apply?
Thanks in advance!