I'm struggling to compile an iPad app for use on iOS 6 and iOS 7.
Here's the message I keep getting:
Property 'barTintColor' not found on object of type 'UITabBar *'; did you mean 'tintColor'?
The Base SDK
for the target is set to Latest iOS (iOS 7.0)
, and the iOS Deployment Target
is iOS 6.0
. I did a Clean on the project.
Here is the code:
In the .h file:
@property (nonatomic, strong) IBOutlet UITabBar *tabbedBar;
In the .m file:
if ([tabbedBar respondsToSelector: @selector(barTintColor)]) {
tabbedBar.barTintColor = [UIColor blackColor];
}
I'm compiling against the iOS 7 SDK, so it should know about barTintColor. Any idea what the problem could be?
Updated:
Okay, I'm making progress, but not quite understanding why.
See this Xcode screenshot. Note the two entries for my iPad 3 in the Active Scheme selection. What is the difference? If I choose the top option, I get the error. If I choose the bottom option, it works.
Can anyone explain why the same device appears twice in this list, and why it works when I choose one and not the other? FYI, the device has iOS 6 installed.