tvOS focus - "ISSUE: This item is not visible onscreen."

Hey,

I have an app that presents a UIWindow on top of an existing window. I've made all the needed calls to makeKeyAndVisible() and I can clearly see the new window with the subviews on the screen.

I've made the subview receive focus by implementing them as custom views that have canBecomeFocused as true

also the window implements preferredFocusEnvironments and returns these subviews

The issue the focus engine doesn't want to move to the bottom view, it seems the first one does get focus.

The error I'm seeing when printing using UIFocusDebugger.checkFocusability():

<UIFocusUpdateContext: 0x600003318000: previouslyFocusedItem=<FV: 0x102a17f30>, nextFocusedItem=(null), focusHeading=Down>
The following issues were found that would prevent this item from being focusable:
 - ISSUE: This item is not visible onscreen.

I can't find any reference online about this error, so it seems something really wild is going on and I can't find the reason.

Did anyone encounter this before or knows when this error is being printed? What causes the focus engine to think the view is not visible when it's all there?

Found the reason, I was adding a UIView part of the view hierarchy to this window, and it didn't had a frame (I'm not using autolayout). Once set a proper size to that subview everything works well!

tvOS focus - "ISSUE: This item is not visible onscreen."
 
 
Q