Skip to content

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

@fanruoyang

Description

@fanruoyang

运行环境

  • iOS 设备:iPhone14Prox
  • 系统版本:iOS 16.x
  • Xcode 版本:14.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方法中,重新写了一下这个返回 然后准确了,我不清楚是我项目的原因 还是咱们就没有写这个适配

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions