[英]Navigation bar not showing to the top edge in iOS11 iPhoneX simulator
我遇到了这个问题,过去几天我都找不到答案。
导航栏未显示在iOS 11模拟器中iPhone X的顶部,这是模拟器错误还是我做错了?
身高88
身高145
无背景图片
这是我在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];
奇怪的行为,有两个想法:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.