LTNavigationBar icon indicating copy to clipboard operation
LTNavigationBar copied to clipboard

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

Open huangwangxin opened this issue 8 years ago • 3 comments

今天在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)];

这样改合适吗?

huangwangxin avatar Sep 20 '17 11:09 huangwangxin

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

zzcshao avatar Sep 21 '17 07:09 zzcshao

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

huangwangxin avatar Sep 22 '17 12:09 huangwangxin

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

Wangyixuan avatar Sep 25 '17 02:09 Wangyixuan