| 型号 | 状态栏 | 导航栏 | 比例 |
|---|---|---|---|
| iPhone8 | 20.0 | 44.0 | 2.0 |
| iPhone8 Plus | 20.0 | 44.0 | 3.0 |
| iPhone11 | 48.0 | 44.0 | 2.0 |
| iPhone11 Pro/Max | 44.0 | 44.0 | 3.0 |
| iPhone12/Pro/Max | 47.0 | 44.0 | 3.0 |
| iPhone12mini | 50.0 | 44.0 | 3.0 |
| iPhone13mini | 50.0 | 44.0 | 3.0 |
| iPhone13/Pro/Max | 47.0 | 44.0 | 3.0 |
- iOS15获取状态栏高度
guard let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene else { return }
let statusBarManager = windowScene.statusBarManager
statusBarManager?.statusBarFrame.size.height