简体   繁体   中英

Top bar visible in iPhone5 but not in iPhone6

I am running my code on simulator iPhone5 and iPhone6. The problem is top bar is visible in iPhone5 but not in iPhone6 or iPhone6+. Please see attahced images.

在此处输入图片说明

and

在此处输入图片说明

What could be the issue?

Following steps i have performed to set top navigation color

  1. few changes made in info section 在此处输入图片说明

  2. following code i have added in my app delegate file

    navigationController.navigationBar.translucent = NO; [navigationController.navigationBar setTintColor:[UIColor whiteColor]]; [[UINavigationBar appearance] setBarTintColor:[UIColor blackColor]]; [[UINavigationBar appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:[UIColor whiteColor], nil] forKeys:[NSArray arrayWithObjects:NSForegroundColorAttributeName, nil]]];

Set UIViewControllerBasedStatusBarAppearance to NO in info.plist.

Call

[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];

In application did finish launching method.

And remove everything else.

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