状态栏设置颜色没用:
- 在UIViewController里的viewWillApper或viewDidAppear里面加入[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent]
- 去info.plist文件里面设置View controller–based status bar appearance 为NO
- [[UINavigationBar appearance] setBackgroundImage:[[UIImage alloc] init] forBarPosition:UIBarPositionAny barMetrics:UIBarMetricsDefault];
- [[UINavigationBar appearance] setShadowImage:[[UIImage alloc] init]];
或者
self.navigationController.navigationBar.clipsToBounds = YES;
时间: 2024-10-12 20:32:54