QMUIDemo_iOS icon indicating copy to clipboard operation
QMUIDemo_iOS copied to clipboard

灵动岛导航栏高度适配的问题

Open fanruoyang opened this issue 2 years ago • 0 comments

运行环境

  • [x] iOS 设备:iPhone14Prox
  • [x] 系统版本:iOS 16.x
  • [x] Xcode 版本:14.x
  • [x] QMUI iOS 版本:4.6.x

具体问题描述

关于宏定义 StatusBarHeightConnstant在存在导航栏的情况下 ,灵动岛的情况下 高度返回的不对少了

问题截图

我通过 if #available(iOS 13.0, *) { let window = UIApplication.shared.windows.first let topPadding = window?.safeAreaInsets.top statusBarHeight = topPadding ?? 20.0 } else { statusBarHeight = UIApplication.shared.statusBarFrame.height } 这个方法判断了一下是没问题的,在QMUIhelper 的statusBarHeightConstant方法中,重新写了一下这个返回 然后准确了,我不清楚是我项目的原因 还是咱们就没有写这个适配

fanruoyang avatar Jul 20 '23 08:07 fanruoyang