第一步:在info.plist中添加一个字段:view controller -base status bar 设置为NO

第二步:在info.plist中修改字段值:Status bar style 设置为UIStatusBarStyleLightContent;或者将工程TARGETS->Deployment Info->Status Bar Style 修改为 Light

备注:如果需要在其他地方修改状态栏的字体颜色,执行以下代码即可:
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault animated:YES];
网友评论