0
votes

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.

enter image description here

and

enter image description here

What could be the issue?

Following steps i have performed to set top navigation color

  1. few changes made in info section enter image description here

  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]]];

1
Can you check if the top bar is visible on a white background? Also are they both running the same version of iOS?Kakshil Shah
@KakshilShah Yes, top bar is visible with white background. iOS Version is same for both runningManish Shukla
So the problem is that, in iPhone 5 it shows white top bar, and iPhone 6 it shows black? Am i correct?Kakshil Shah

1 Answers

1
votes

Set UIViewControllerBasedStatusBarAppearance to NO in info.plist.

Call

[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];

In application did finish launching method.

And remove everything else.