SwiftUIPager
SwiftUIPager copied to clipboard
[BUG] tvOS NavigationLink not work
Describe the bug Swiping, rendering all work, bug unable to click on tvOS with NavigationLink content.
To Reproduce
struct ContentView: View {
@StateObject var page: Page = .first()
var data = Array(0..<10)
var body: some View {
NavigationStack {
VStack {
NavigationLink(destination: EmptyView()) {
Text("Hello, world!")
}
Pager(page: page, data: data, id: \.self) { item in
NavigationLink(destination: EmptyView()) { // ==> BUG? can't jump to EmptyView
Text("\(item)")
}
.background(.gray)
}
.preferredItemSize(CGSize(width: 300, height: 300))
.itemSpacing(20)
.frame(height: 500)
}
}
.padding()
}
}
I packaged a sample project to reproduce the issue, you can just download and open it with xcode, and run it on the Apple TV simulator.
SwiftUIPagerTVOSDemoProject.zip
Expected behavior NavigationLink can jump
Screenshots / Videos

Environment:
- OSX: tvOS
- Device Apple TV 4K (3dr generation) Simulator
- SwiftUIPager version: 2.5.0
Additional context
You are right. We have some bugs in tvOs side.