Use compact header (iPhone style) on iPad and Mac Catalyst instead of the expanded custom header. The expanded header (macNavigationHeader) is now only used on true Mac iPad App (Designed for iPad on Mac). This optimizes space usage: - iPhone: Compact header with back button, title, connection/RSSI - iPad split view: Same compact header (not expanded) - Mac Catalyst: Same compact header (not expanded) - Mac iPad App: Full custom header (already optimized for Mac) Ensures consistent, space-efficient header across all platforms.
@@ -127,7 +127,8 @@ struct MeterView: View {
|
||
| 127 | 127 |
) |
| 128 | 128 |
|
| 129 | 129 |
VStack(spacing: 0) {
|
| 130 |
- if Self.isMacIPadApp {
|
|
| 130 |
+ // Use compact header on Mac Catalyst (like iPhone), full custom header only on Mac iPad App |
|
| 131 |
+ if Self.isMacIPadApp && !Self.isPhone {
|
|
| 131 | 132 |
macNavigationHeader |
| 132 | 133 |
} |
| 133 | 134 |
Group {
|
@@ -149,12 +150,14 @@ struct MeterView: View {
|
||
| 149 | 150 |
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .top) |
| 150 | 151 |
} |
| 151 | 152 |
#if !targetEnvironment(macCatalyst) |
| 152 |
- .navigationBarHidden(Self.isMacIPadApp || landscape) |
|
| 153 |
+ .navigationBarHidden(Self.isMacIPadApp && !Self.isPhone || landscape) |
|
| 154 |
+ #else |
|
| 155 |
+ .navigationBarHidden(landscape) |
|
| 153 | 156 |
#endif |
| 154 | 157 |
} |
| 155 | 158 |
.background(meterBackground) |
| 156 | 159 |
.modifier(IOSOnlyNavBar( |
| 157 |
- apply: !Self.isMacIPadApp, |
|
| 160 |
+ apply: !Self.isMacIPadApp || Self.isPhone, |
|
| 158 | 161 |
title: navBarTitle, |
| 159 | 162 |
showRSSI: navBarShowRSSI, |
| 160 | 163 |
rssi: navBarRSSI, |