简体   繁体   中英

status bar turning to black for some reason

For some reason, when I push to my next view, the status bar turns black.

What it should look like:

在此处输入图片说明

What it looks like:

在此处输入图片说明

This only for a specific set of view controllers. Here's my code:

//transitioning to uploadpicture, passing currentUser
    UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Storyboard" bundle:nil];
    UploadPictureViewController *viewController = [storyboard instantiateViewControllerWithIdentifier:@"uploadPictureVC"];

    [self.navigationController pushViewController:viewController animated:YES];

Try adding this to your UploadPictureViewController implementation file.

-(UIStatusBarStyle)preferredStatusBarStyle {
    return UIStatusBarStyleLightContent;
}

您需要在“顶部栏下方”延伸边缘。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM