0

In my AppDelegate I've customized the colors of the UINavigationBar, but when I double tap the home button to open the multitasking drawer, my app preview looks like this:

enter image description here

When in reality its supposed to look like this:

enter image description here

(Just ignore the different content in app.)

This is the code I use for changeing colors and fonts:

// set navigation bar colors
UINavigationBar *navigationBar = [UINavigationBar appearance];
navigationBar.barTintColor = redColor;
navigationBar.tintColor = [UIColor whiteColor];
navigationBar.titleTextAttributes = @{
                                      NSForegroundColorAttributeName: [UIColor whiteColor],
                                      NSFontAttributeName: [UIFont fontWithName:@"SOLIDARITET" size:26.0]
                                      };
rmaddy
  • 314,917
  • 42
  • 532
  • 579
rebellion
  • 6,628
  • 11
  • 48
  • 79
  • @JohnRiselvato I'm using Storyboard, and the MainStoryboard says it's white. – rebellion Jun 04 '14 at 18:47
  • 1
    wait... your porting from before ios 7 aren't you? – John Riselvato Jun 04 '14 at 18:50
  • Correct @JohnRiselvato, guess there's something I've missed during the version upgrade? – rebellion Jun 04 '14 at 19:26
  • 1
    Yeah, you are using iOS 7 properties on iOS 6 UI elements. As you can see you're getting a gradient on your UINavigationBar, that gradient is an iOS 6 property. I'm unsure how you solve this but I would check this out: http://stackoverflow.com/questions/20776131/how-to-make-xib-files-compatible-to-both-ios7-ios6-and-earlier – John Riselvato Jun 04 '14 at 19:30

1 Answers1

0

Found the solution. I selected my Storyboard file, and set the background color in the Attributes Inspector from currentColor to whiteColor.

rebellion
  • 6,628
  • 11
  • 48
  • 79