Post

Replies

Boosts

Views

Activity

Focus/Scroll Behavior in SwiftUI LazyVGrid on tvOS with custom ButtonStyle
Hi there, has anyone a workaround for the undesired scroll behavior in a LazyVGrid on tvOS when using a custom ButtonStyle? When moving sideways on the Siri remote, my ScrollView keeps scrolling downward or upward, moving the focused cell out of the TV screen (even though it is focused correctly!) - but only if I apply custom ButtonStyle to my NavigationLinks or Buttons. I really need a custom ButtonStyle to remove the dark gray background. But by applying the custom style, I get this strange behavior which is not the case using a "plain" NavigationLink or Button. I stuck now for days with this issue and couldn't find anything on the web, yet. I'd appreciate every hint.
0
0
1.4k
Oct ’20
SwiftUI NavigationLink in List on iOS 14
Hi everyone, I'm experiencing some unwanted behaviour in my app on iOS 14. When tapping on a NavigationLink in a List, the "Cell" keeps being highlighted even when navigating back from the detail view. Only if I selected another Cell, the highlighting disappears. But therefore the other Cell is now highlighted. Is there any way to remove this behaviour? Running on iOS 13, everything was normal. The only workaround is to attach .id(UUID()) to the NavigationLink. But this will cause a flickering of all Cells when navigating back from the detail view and losing the scrolling position of the list. Thanks for any help or hints.
12
0
11k
Sep ’20