question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TvFocusGuideView implementations/limitations? (discussion/question)

See original GitHub issue

Not 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:closed
  • Created 3 years ago
  • Comments:18

github_iconTop GitHub Comments

2reactions
olafurnsigcommented, Oct 16, 2020

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 😃

1reaction
douglowdercommented, Oct 17, 2020

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.m

I 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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found