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 X的导航条显示不全 #73

Open
huangwangxin opened this issue Sep 20, 2017 · 3 comments
Open

适配iPhone X的导航条显示不全 #73

huangwangxin opened this issue Sep 20, 2017 · 3 comments

Comments

@huangwangxin
Copy link

今天在iPhone X模拟器上跑,导航栏显示不全。
在UINavigationBar+Awesome.m文件中31行改为如下:
CGFloat height = [UIApplication sharedApplication].statusBarFrame.size.height;
self.overlay = [[UIView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.bounds), CGRectGetHeight(self.bounds) + height)];

这样改合适吗?

@zzcshao
Copy link

zzcshao commented Sep 21, 2017

在iPhone X模拟器下运行的结果
(lldb) po self.bounds.size.height
44
(lldb) po [UIApplication sharedApplication].statusBarFrame.size.height
20
结果还是之前的64 , 求大神解释下.

@huangwangxin
Copy link
Author

@zzcshao [UIApplication sharedApplication].statusBarFrame.size.height == 20的问题可能是你没有适配iPhone X,你要在Assets添加启动图,尺寸1125x2436像素。 这样子适配iPhone X,statusBarFrame.size.height的高度就为44像素了

@Wangyixuan
Copy link

@h1101723183 我提了一个新问题 请问适配iOS 11的时候 你遇到了么

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants