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

[BUG] tvOS NavigationLink not work #308

Open
isaced opened this issue Jan 29, 2023 · 1 comment
Open

[BUG] tvOS NavigationLink not work #308

isaced opened this issue Jan 29, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@isaced
Copy link

isaced commented Jan 29, 2023

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

image

Environment:

  • OSX: tvOS
  • Device Apple TV 4K (3dr generation) Simulator
  • SwiftUIPager version: 2.5.0

Additional context

@isaced isaced added the bug Something isn't working label Jan 29, 2023
@metin-atalay
Copy link

You are right. We have some bugs in tvOs side.

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