I'm working on an iOS 6 app that's needs to be compatible with iOS 7. I use UIAppearance
to style the tint color on some of the components of the app, in particular the UINavigationBar
and its Bar Button items.
The problem is that when I deploy the app on an iOS 7 device, the bar button items' tint color is modified to the color of the navigation bar. I understand that iOS 7’s UIAppearance
introduces some modifications in this (UINavigationBar
) and that if I want to use it properly for iOS 7 I should set the barTintColor property instead, however since I mean to keep my app as iOS 6 and I’m compiling it with SDK 6 in Xcode 4.6.3 there’s no way I can use that property.
I’ve tried many things, some of them worked in some scenarios but I still can’t get it to work in the whole app. Any ideas?
Here's a screenshot of the problem I'm having
EDIT 1
To style the app I added the following code in the AppDelegate
[[UINavigationBar appearance] setTintColor:[UIColor colorWithRed:245.0/255.0 green:245.0/255.0 blue:245.0/255.0 alpha:1.0]];
[[UIBarButtonItem appearance] setTintColor:[UIColor colorWithRed:230.0/255.0 green:0.0/255.0 blue:0.0/255.0 alpha:1.0]];
EDIT 2
I tried to deploy the app from Xcode 5 with SDK 7 and deployment target 5, but when I deployed it on an iOS 7 device it changed my UI to iOS 7. This is not a matter of recognising when is the app is running in iOS 7 because I don't want the app to look iOS 7 like, I want it to look the same as it looks in iOS 6
Thanks in advance!