[英]Navigation bar not showing to the top edge in iOS11 iPhoneX simulator
I'm having this problem with i couldn't find an answer for it in the past couple of days. 我遇到了这个问题,过去几天我都找不到答案。
The navigation bar is not showing to the top edge of the iPhone X in iOS 11 simulator, Is that a simulator bug or i'm doing something wrong ? 导航栏未显示在iOS 11模拟器中iPhone X的顶部,这是模拟器错误还是我做错了?
Height 88 身高88
Height 145 身高145
No background image 无背景图片
And this is my code in appdelegate 这是我在appdelegate中的代码
[[UINavigationBar appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor]}];
[[UINavigationBar appearance] setBarTintColor:[UIColor whiteColor]];
[[UIBarButtonItem appearance] setTintColor:[UIColor whiteColor]];
UIImage *navImage = [[UIImage imageNamed:@"iPhone-Navigationbar.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 5, 0, 5)];
[[UINavigationBar appearance] setBackgroundImage:navImage forBarMetrics:UIBarMetricsDefault];
Strange behavior, a couple of ideas: 奇怪的行为,有两个想法:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.