Questions tagged [uifocusguide]

11 questions
3
votes
2 answers

How to manually select next focused index path in collection view

How can I manually decide the next focused index path for my collection view on tvOS? My use case is that I have a collection view with dynamic cells that scrolls in all directions, and sometimes when a cell in one section spans across several cells…
3
votes
1 answer

How to manage focus when you use container ViewControllers

How to manage FocusGuide in tvOS when you have container view/views? I'm using a MasterViewController and have more than one container view controllers and it all together act like UITabBarController. But when I navigate between buttons it's not…
MGY
  • 7,245
  • 5
  • 41
  • 74
1
vote
1 answer

SwiftUI tvOS: Handle focus for first button on navigating downwards direction

I want to focus on the first Button A of the bottom Hstack when the user navigates downwards. How can I achieve that? As of now, the guide is picking the nearest element. Code: import SwiftUI struct DummyView: View { …
Abhishek Thapliyal
  • 3,497
  • 6
  • 30
  • 69
1
vote
0 answers

SwiftUI tvOS: NavigationLink with button style custom disables auto scroll in List view

I want to achieve a .buttonStyle(.card) scrolling behaviour in custom button style in NavigationLink. NavigationLink { Color.blue } label: { listItem(model: model) } .buttonStyle( HomeCardStyle(onFocusChange: { isFocused in if…
Abhishek Thapliyal
  • 3,497
  • 6
  • 30
  • 69
1
vote
0 answers

SwiftUI tvOS Buttons wrapped inside focusable HStack do not respond action

I found similar problems on SO about the focus engine with SwiftUI on tvOS. I think I managed to solve the focusable issue by wrapping the two Buttons here inside HStack with focusable. HStack(spacing: 40) { …
Seto
  • 1,234
  • 1
  • 17
  • 33
1
vote
0 answers

UIFocusGuide: only forward if system has no solution

I have a wide "dock" area at the bottom of the screen. I have placed a UIFocusGuide across the top of it. Depending on which element in the dock has focus, the system may or may not have a focus solution if the user swipes up. How can I tell my…
Trygve
  • 1,317
  • 10
  • 27
1
vote
1 answer

what is an `AVFocusProxyView` in tvOS? Getting a weird focus issue

what is an AVFocusProxyView ? When we show the AVContentProposal on top of a full screen player, AVFocusProxyView is hiding the accept/reject button . I am not able to move focus when this happens. And I am getting the following error on the…
abhimuralidharan
  • 5,752
  • 5
  • 46
  • 70
0
votes
1 answer

How to manage focus handling in AVPlayerViewController with custom controls?

I try to add a skip-intro-button (like Netflix) to the AVPlayerViewController of a tvOS movie app. I added it as subview to the contentOverlayView and when I let it appear I force giving it the focus with preferredFocusEnvironments. Everything's…
Kai Huppmann
  • 10,705
  • 6
  • 47
  • 78
0
votes
1 answer

TV OS UIFocusEnvironment Not focusing Button

Hi all I am a beginner in TV OS App development. As mentioned below image, I could move the buttons, Button1 -> Right Arrow -> focusing Button 2 I have noticed that, When moving down next (From Button2 to Button4) focusing item frame should be with…
Vineesh TP
  • 7,755
  • 12
  • 66
  • 130
0
votes
1 answer

Can't move button focus to the next row

What I have here is 3 buttons. Btn2 is disabled. When Btn1 is focused, I can't move it to Btn3. All what I need is when Btn2 is disabled, I can move between Btn1 and Btn3 by swiping down and up on the TV controller. +----+ |Btn1| +----+ +----+ …
zs2020
  • 53,766
  • 29
  • 154
  • 219
-1
votes
3 answers

How to change white background when UISegmentedControl focused?

I try to change white background color in segment if UISegmentedControl gets focus. Please look the folowing screenshot: And I need to change this white background color into clear. Something like this: So I've created subclass of…
Taras
  • 1,485
  • 1
  • 16
  • 31