第一步Info.plist中加入View controller-based status bar appearance 值设置为NO
第二步在AppDelegate 中加入以下代码
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) {
self.window.frame = CGRectMake(0,20,self.window.frame.size.width,self.window.frame.size.height-20);
UIApplication *myApp = [UIApplication sharedApplication];
[myApp setStatusBarStyle: UIStatusBarStyleLightContent];
}
本文介绍如何在iOS应用中设置状态栏透明效果,并调整状态栏样式。主要步骤包括:在Info.plist文件中设置Viewcontroller-basedstatusbarappearance为NO;在AppDelegate中调整窗口frame并设置状态栏样式。
1077

被折叠的 条评论
为什么被折叠?



