Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

NavigationView/NavigationLink #129

Closed
j-f1 opened this issue Jun 30, 2020 · 5 comments · Fixed by #130
Closed

NavigationView/NavigationLink #129

j-f1 opened this issue Jun 30, 2020 · 5 comments · Fixed by #130
Labels
SwiftUI compatibility Tokamak API differences with SwiftUI

Comments

@j-f1
Copy link
Member

j-f1 commented Jun 30, 2020

Having this view ready would clean up the demo page and make it easier to add or fix just one view. It’s probably good to start with the 2-column iPad style and maybe expand later on to an iPhone style on narrower viewports.

@j-f1 j-f1 changed the title NavigationView NavigationView/NavigationLink Jun 30, 2020
@MaxDesiatov MaxDesiatov added the SwiftUI compatibility Tokamak API differences with SwiftUI label Jun 30, 2020
@MaxDesiatov
Copy link
Collaborator

This also could be a part of a bigger URL routing story, but for now just plain compatibility with SwiftUI should be enough to clean things up significantly.

@j-f1
Copy link
Member Author

j-f1 commented Jun 30, 2020

I did a quick test of a NavigationView with five subviews, and it renders:

  • the first view in portrait on iPhones
  • the fifth in landscape on iPhones (with the first view visible by tapping the back button or swiping in from the edge)
  • the third view in portrait on iPads (with the first two views visible next to each other by swiping in from the edge or tapping the sidebar button)
  • the second and third view in landscape on iPads (with the first view visible by swiping in from the edge or tapping the sidebar button)

(the fourth view is never visible)
Confusing!

@MaxDesiatov
Copy link
Collaborator

Is this with iOS 13 and Xcode 11.5, or iOS 14 and Xcode 12 betas?

@j-f1
Copy link
Member Author

j-f1 commented Jun 30, 2020

This is iOS 13 on iPhone and iOS 14 beta on iPad sim

@carson-katri
Copy link
Member

carson-katri commented Jun 30, 2020

My guess is that NavigationView only really expects (up to) 3 views. iPhone uses StackNavigationViewStyle by default, and iPad uses DoubleColumnNavigationViewStyle.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
SwiftUI compatibility Tokamak API differences with SwiftUI
Development

Successfully merging a pull request may close this issue.

3 participants