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

判断是否全面屏方法在真机上不准确 #463

Closed
592424188 opened this issue Dec 22, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@592424188
Copy link

commented Dec 22, 2018

请填写运行环境

  • 设备:真机 iPhone 7
  • 系统:iOS 12.0.1
  • Xcode 版本:10.1
  • QMUI iOS 版本:2.9.3

请描述具体问题

/// 是否全面屏设备
#define IS_NOTCHED_SCREEN [QMUIHelper isNotchedScreen]

这个宏在真机iPhone 7上判断无效额,返回YES
把这个方法 改为上个版本的实现方法就能用

相关截图(断点的堆栈、控制台的 log)

@MoLice MoLice added the bug label Dec 22, 2018

@MoLice

This comment has been minimized.

Copy link
Collaborator

commented Dec 22, 2018

这里是有 bug,最近会发个小版本修复,在此之前建议先按照以下代码修改:

if (@available(iOS 12, *)) {
    UIWindow *window = [[UIWindow alloc] init];
    isNotchedScreen = window.safeAreaInsets.bottom > 0 ? 1 : 0;
}
@MoLice

This comment has been minimized.

Copy link
Collaborator

commented Dec 28, 2018

已发布 3.0.0 修复改 bug。

@MoLice MoLice closed this Dec 28, 2018

@MoLice MoLice referenced this issue Jan 2, 2019

Closed

TabBarHeight 宏返回高度不正确 #475

4 of 4 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.