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

Navigation links in CollectionView #4

Open
danielsaidi opened this issue Nov 11, 2020 · 7 comments
Open

Navigation links in CollectionView #4

danielsaidi opened this issue Nov 11, 2020 · 7 comments
Labels
bug Something isn't working

Comments

@danielsaidi
Copy link

danielsaidi commented Nov 11, 2020

Hi! I noticed that navigation links don't work when I use them within a CollectionView, while regular buttons do work. I wonder if it has something to do with the hosting controller and how it may block the navigation from happening.

@defagos
Copy link
Owner

defagos commented Nov 11, 2020

Good catch! I wouldn't be surprised if this is related to missing parent-child containment relationship, see this tweet from Peter Steinberger and related articles and links.

Didn't have to focus on this specific question myself, but this is definitely where I would have a look first.

@defagos defagos added the bug Something isn't working label Nov 11, 2020
@danielsaidi
Copy link
Author

I'd be happy to not have navigation links, but rather use buttons that trigger sheets or full screen covers...but I guess it would be nice to solve this for other scenarios than tvOS.

@danielsaidi
Copy link
Author

Since the scroll view offset and item re-selection works when returning to the collection from a sheet or full screen modal (after I fixed my incorrect data reload), I have no need to do "real" navigation anymore...at least for now. It may however be good to have support for navigation links when the target destination can have deeper navigation, right?

@defagos
Copy link
Owner

defagos commented Nov 13, 2020

I fear this collection view implementation might have some limitations, but if navigation links could be properly supported that would be nice (and probably something has to be learnt when trying to make them work).

I therefore labeled this issue as a bug.

@danielsaidi
Copy link
Author

danielsaidi commented Nov 13, 2020

Perfect, I'll see if I can come up with a solution, but until then the sheet and full screen cover approach work well when the navigation is not that deep. I don't even know if there would be any problems with deep navigation and sheets on tvOS.

@defagos
Copy link
Owner

defagos commented Nov 13, 2020

Didn’t see any deep navigation issues in the app I am working on 🙂

@danielsaidi
Copy link
Author

Great! I realized that perhaps on tvOS the sheet implementation is the same thing as pushing onto a navigation stack. I mean, there is no sheet concept on the platform, so the implementation could actually be that they do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants