Frage

my app has a custom dark navigation bar, and on the method Application i put the code:

[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];

but when i came back from an image picker from gallery iOS reuse black color and use it in all the application. Why?

War es hilfreich?

Lösung

Hi using this method you can manage the navigation bar

 - (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
    {

        [viewController.navigationItem setTitle:@"Videos"];
        [viewController.navigationController.navigationBar setTintColor:[UIColor whiteColor]];
        [viewController.navigationItem.leftBarButtonItem setTintColor:[UIColor whiteColor]];
        [viewController.navigationItem.rightBarButtonItem setTintColor:[UIColor whiteColor]];

        if ([navigationController isKindOfClass:[UIImagePickerController class]]) {
            [[UIApplication sharedApplication] setStatusBarHidden:NO];
            [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent animated:NO];
        }
    }

Thanks

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top