fermoya / SwiftUIPager

Native Pager in SwiftUI
MIT License
1.29k stars 172 forks source link

[BUG] tvOS scrolling issue #237

Closed staticdreams closed 2 years ago

staticdreams commented 3 years ago

Describe the bug Installed as expected using SPM. Unable to scroll on tvOS even though package claims to be tvOS compatible.

To Reproduce Implement a basic example with focusable areas, such as NavigationLink

Expected behaviour Expected to scroll left or right using Apple TV Remote, just like on a standard ScrollView. Also expected to center focused item

Screenshots / Videos On the screenshot, left item is in focus. It is not centered and unable to scroll to the left, beyond this item (there a total of 5 in the pager)

Simulator Screen Shot - Apple TV 4K (2nd generation) - 2021-10-28 at 09 18 48

Environment:

fermoya commented 2 years ago

Hi @staticdreams , you're right, thanks for raising this. I wasn't aware of the special treat that tvOS and potentially macOS need. I'm fixing this, will come to you shortly

HenryGlendening commented 2 years ago

I'm experiencing this issue while running the latest code. I think the patch (https://github.com/fermoya/SwiftUIPager/pull/240) allows the user to change which Page is focused by using the Apple TV Remote arrow buttons (on the newer Apple TV Remotes), however, swiping on the remote does not scroll the Page or otherwise respond.