Skip to content
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

Initial tvOS Support 📺 #1

Closed
wants to merge 20 commits into from
Closed

Conversation

toshi0383
Copy link

🎉
gridview-tvos

This is kind of beta implementation.

We still need to ..

  • improve infinite loading timing
  • provide delegate method like UICollectionView's collectionView(:didUpdateFocusInContext:withAnimationCoordinator:) (not sure if possible🤔)

@toshi0383
Copy link
Author

toshi0383 commented Nov 4, 2017

I have detected these bugs.

  • Cell size becomes too small or too large when modifying Cell's transform on focus update. (which I implemented in Example)
  • Focus jumps to unexpected cells on left scroll (right scroll seems ok. Maybe related to infinite scroll.)

@KyoheiG3 Do you come-up with any workaround?

@KyoheiG3
Copy link
Owner

KyoheiG3 commented Nov 6, 2017

Hi, @toshi0383

Cell size becomes too small or too large when modifying Cell's transform on focus update. (which I implemented in Example)

Try to modify transform of subviews on the Cell.

Focus jumps to unexpected cells on left scroll (right scroll seems ok. Maybe related to infinite scroll.)

It so difficult issues. I also couldn't solve.
I guess it depends to reuse of the Cell. So, could you return false with canBecomeFocused if canReuse is true?

Copy link

@dekatotoro dekatotoro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@toshi0383
Copy link
Author

Try to modify transform of subviews on the Cell.

Thanks! I'll try.

It so difficult issues. I also couldn't solve.

Yea maybe we should implement different infinite scroll algorithm for tvOS. (not changing contentOffset, because of focus)
I'll dig further when I have time.😉

@KyoheiG3
Copy link
Owner

KyoheiG3 commented Nov 6, 2017

I'll dig further when I have time.😉

Cool. Thanks!

@toshi0383
Copy link
Author

I guess it depends to reuse of the Cell. So, could you return false with canBecomeFocused if canReuse is true?

This doesn't solve the jumping focus issue, FYI.
I imagine that when changing contentOffset, focusedView remains same. So the focused cell gets out of the screen when contentOffset is applied by infiniteIfNeeded(), which triggers GridView snapping back to show the focused cell.
That's why I said we need a different algorithm.🤔

to correctly calculate frames.
Installed FocusZPositionMutating.framework via Cartfile.private,
to avoid focused view overlayed by unfocused view.
@toshi0383
Copy link
Author

Cell size becomes too small or too large when modifying Cell's transform on focus update. (which I implemented in Example)

This one is solved in b6a9ad1, using toshi0383/FocusZPositionMutating . It's installed in Example project, because I thought GridView should focus on reuse and drawing views.

@KyoheiG3 KyoheiG3 mentioned this pull request Sep 18, 2018
@toshi0383
Copy link
Author

Closing for now. I'll reopen this when I'm ready again.
Thank you for your kind review!

@toshi0383 toshi0383 closed this Oct 18, 2022
@toshi0383 toshi0383 deleted the tvos branch October 18, 2022 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants