Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iPhone 12 / 12 Pro横屏时导航栏高度是32不是44 #1198

Closed
QuintGao opened this issue Feb 24, 2021 · 2 comments
Closed

iPhone 12 / 12 Pro横屏时导航栏高度是32不是44 #1198

QuintGao opened this issue Feb 24, 2021 · 2 comments
Labels
Projects

Comments

@QuintGao
Copy link

Bug 表现
在iPhone 12/12 Pro模型器下,在控制器中输出self.navigationController.navigationBar.frame发现横屏时导航栏高度是32
而QMUI中的NavigationBarHeight输出高度是44

截图
Bug 现场的界面截图,或者 Xcode 控制台的错误信息截图,有问题的代码截图

如何重现

  1. ...
  2. ...

预期的表现
正常情况下,应该是什么表现

其他信息

  • 设备: [模拟器]
  • iOS 版本: [iOS 14.4]
  • Xcode 版本: [Xcode 12.4]
  • QMUI 版本: [4.2.2]
@MoLice
Copy link
Collaborator

MoLice commented Feb 25, 2021

新版本将会调整,在此之前可以将以下代码替换 QMUIHelper.m 的同名方法:

+ (BOOL)isRegularScreen {
    return [self isIPad] || (!IS_ZOOMEDMODE && ([self is67InchScreen] || [self is65InchScreen] || [self is61InchScreen] || [self is55InchScreen]));
}

另外如果你处于 UIViewController 的上下文里,那应该用 vc.qmui_navigationBarMaxYInViewCoordinator 来获取导航栏的布局,而不是用写死的宏,任何时候宏都只是一个保底方案。

@MoLice MoLice added the bug label Feb 25, 2021
@MoLice MoLice added this to Done in 4.2.3 Feb 25, 2021
@MoLice
Copy link
Collaborator

MoLice commented Mar 31, 2021

已发布 4.2.3 修复该问题。

@MoLice MoLice closed this as completed Mar 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
4.2.3
Done
Development

No branches or pull requests

2 participants