-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
InfiniteCarousel does not play well with remembersLastFocusedIndexPath in tvOS 9.1 #15
Comments
Thanks for the bug report. We'll definitely test this in our own apps under 9.1 as well. At the moment part of the functionality of the carousel relies on touch events from the remote that are not sent when the keyboard is used to change focus; specifically, how far ahead you can focus is limited by the currently focused cell when you touch down. This was to keep the user from scrolling "too quickly", and mimics the tvOS iTunes top featured carousel where only one item at a time can be flicked through. At a glance, since you mention the keyboard left key I would guess that's what you're running into (could very well be wrong). Especially as I'd like to properly support external keyboards I'd be happy to find another alternate implementation that behaves the same (limiting focus to roughly a page ahead or behind) but that does not rely on touch events.
I would not think this is the issue, as it mimics a set up we've used too. |
Thanks for responding. I should have mentioned that this happens when using the magic touchpad in the simulator as well as on the actual Apple TV remote, so it's not just the keyboard. I'm curious as to how |
Ah — that's good information, thank you. I think that particular bit of documentation may be wrong. It currently reads:
My understanding is that this delegate method is always called under the circumstances that It's the second sentence of the documentation that is problematic; rather than reading "for the first time", I think the behavior of I will investigate further. :) |
This is still on our radar and something we're looking at. At the moment my proposed workaround is to disable Have you worked around it similarly, @ehynds? |
Yeah, I did the same. |
@ehynds Mind sharing code for how you used the focus guide? I'm running into the issue as well. Thank you. |
STR:
remembersLastFocusedIndexPath
to true on thenatGeo
InfiniteCarousel instanceExpected:
Carousel moves back one slide and the newly centered slide receives focus
Actual:
Carousel moves back one slide and focus is lost. The carousel enters some weird state that ultimately requires you to force quit the app so that the carousel can be "swiped" through again.
Notes:
indexPathForPreferredFocusedViewInCollectionView
does not get called at all unlessremembersLastFocusedIndexPath
is set to true. I'm still working to figure out why. Possibly because i'm rendering this carousel within a parent collection view?The text was updated successfully, but these errors were encountered: