【发布时间】:2017-11-06 09:17:17
【问题描述】:
我遇到了这个问题,过去几天我找不到答案。
导航栏在 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];
【问题讨论】:
标签: ios objective-c iphone xcode ios11