TvFocusGuideView implementations/limitations? (discussion/question)
See original GitHub issueNot a bug, just a discussion.
I’m trying to work a TvFocusGuideView into a permanent Side-drawer from react-navigation (not native-navigation).
I’m running into an error:
Exception thrown while executing UI block: NSLayoutConstraint for <NSLayoutYAxisAnchor:0x282150040 "UIFocusGuide:0x28077cd20''.top">: A constraint cannot be made from <NSLayoutYAxisAnchor:0x282150040 "UIFocusGuide:0x28077cd20''.top"> to a constant. Location anchors require being paired.
Has it something to do with absolute positioning?
I’ve already implemented one TvFocusGuideView on a screen and it works as expected, however putting one in the Sidedrawer is stumping me a bit.
Issue Analytics
- State:
- Created 3 years ago
- Comments:18
Top Results From Across the Web
TvFocusGuideView implementations/limitations? (discussion ...
I'm trying to work a TvFocusGuideView into a permanent Side-drawer from react-navigation (not native-navigation). I'm running into an error:.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

BTW - with all the discussions happening in issues here, I wonder if a Slack space for this project would be a good idea, since react native tvOS development is a bit of a wild west thing and many questions surround it 😃
On Apple TV, the focus guide attempts to size itself to its containing view (the one rendered in https://github.com/react-native-community/react-native-tvos/blob/tvos-v0.63.1/Libraries/Components/AppleTV/TVFocusGuideView.js). See the
addFocusGuide()method and its constraint calls in https://github.com/react-native-community/react-native-tvos/blob/tvos-v0.63.1/React/Views/RCTTVFocusGuideView.mI suspect the problem seen by @olafurnsig is related to that. That code was added to solve some other issues where the focus guide would render with zero size. It may be helpful to make sure that the focus guide’s parent is a plain
View, if that is possible in your design.