2

I have a simple pattern : a list view with a detail view. Both have navigation bar item.

Problem: Only on the detail view when I rotate the screen to landscape, the navigation bar item disappears and will never appear anymore even If I rotate back. This bug occurs only on iOS14.

ListView :

NavigationView{
    ZStack{
    (List and NavigationLink...)
    }.navigationBarItems(trailing: Button(...))
    .sheet(someSheet...)
}.navigationViewStyle(StackNavigationViewStyle())

DetailView :

ZStack {
    (someView...)
    .navigationBarTitle(...)
    .navigationBarItems(trailing: Button(...))
    .sheet(someSheet...)
}
Jopolaz
  • 402
  • 1
  • 3
  • 18
  • just to confirm, this bug has happened to me too. I'm curious to know if you're having this issue only on iPad or not. – Mahdi BM Oct 02 '20 at 14:20
  • It's an iPhone app. I don't test it on iPad. – Jopolaz Oct 02 '20 at 14:56
  • @MahdiBM did you fix it ? – Jopolaz Oct 02 '20 at 15:56
  • not exactly a `Fix`, but rather a workaround. navigation items dont appear because they are too far to the left/right, so you can just use a spacer(minLength: (heightOfScreen - widthOfScreen) / 2) to make them come to the visible area. i've also only experienced this but on iPad, not iPhone – Mahdi BM Oct 03 '20 at 14:08
  • I don't succeeded to move it again to visible area on iPhone. – Jopolaz Oct 04 '20 at 08:56

0 Answers0