Navigation bar should remain visible on iPad portrait to show back button for returning to sidebar from detail view. IOSOnlyNavBar (compact header) should only apply on iPhone where navigation is stack-based. Changes: - navigationBarHidden now only hides in landscape or for Mac apps - IOSOnlyNavBar applies only to iPhone (!isTrueMacApp && isPhone) - iPad portrait: uses default NavigationView back button - iPad landscape: hides nav bar, shows compact tab bar - Catalyst: same as iPad behavior Fixes inability to return to sidebar on iPad.
@@ -153,14 +153,14 @@ struct MeterView: View {
|
||
| 153 | 153 |
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .top) |
| 154 | 154 |
} |
| 155 | 155 |
#if !targetEnvironment(macCatalyst) |
| 156 |
- .navigationBarHidden(Self.isTrueMacApp || landscape) |
|
| 156 |
+ .navigationBarHidden(Self.isTrueMacApp && landscape) |
|
| 157 | 157 |
#else |
| 158 | 158 |
.navigationBarHidden(landscape) |
| 159 | 159 |
#endif |
| 160 | 160 |
} |
| 161 | 161 |
.background(meterBackground) |
| 162 | 162 |
.modifier(IOSOnlyNavBar( |
| 163 |
- apply: !Self.isTrueMacApp, |
|
| 163 |
+ apply: !Self.isTrueMacApp && Self.isPhone, |
|
| 164 | 164 |
title: navBarTitle, |
| 165 | 165 |
showRSSI: navBarShowRSSI, |
| 166 | 166 |
rssi: navBarRSSI, |