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

198 Views Asked by At

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 UIFocusDebugger console :

image

This is the error:

  • Issue: The item is being visually occluded by the following items: AVFocusProxyView 0x149e22600

How to fix this? There is no documentation as well as google results about AVFocusProxyView.

enter image description here AVFocusProxyView appears over the top of every button/views.

Solution for the focus issue that we face because of `AVFocusProxyView`.

We were unable to move the focus around because of the AVFocusProxyView overlay on top of the AVContentProposal. The fix was to add UIFocusGuide:

view.addFocusGuide(anchorView: acceptButton, heading: .left   , sideSize: 80, targetFocus: rejectButton)
view.addFocusGuide(anchorView: rejectButton, heading: .right  , sideSize: 80, targetFocus: acceptButton)
1

There are 1 best solutions below

0
On

Hidding the AVFocusProxyView fixed the issue for me. iterate through the subview and hide the AVFocusProxyView fixed the issue