我正在努力编译一个iPad应用程序,以便在iOS 6和iOS 7上使用.
这是我一直得到的信息:
Property 'barTintColor' not found on object of type 'UITabBar *'; did you mean 'tintColor'?
Run Code Online (Sandbox Code Playgroud)
将Base SDK目标设定为Latest iOS (iOS 7.0),且iOS Deployment Target是iOS 6.0.我在项目上做了一个Clean.

这是代码:
在.h文件中:
@property (nonatomic, strong) IBOutlet UITabBar *tabbedBar;
Run Code Online (Sandbox Code Playgroud)
在.m文件中:
if ([tabbedBar respondsToSelector: @selector(barTintColor)]) {
tabbedBar.barTintColor = [UIColor blackColor];
}
Run Code Online (Sandbox Code Playgroud)
我正在编译iOS 7 SDK,所以它应该知道barTintColor.知道问题可能是什么?
更新:
好的,我正在取得进展,但不太明白为什么.
看到这个Xcode截图.请注意Active Scheme选择中我的iPad 3的两个条目.有什么不同?如果我选择顶部选项,我会收到错误.如果我选择底部选项,它可以工作.

任何人都可以解释为什么同一设备在此列表中出现两次,以及为什么它在我选择一个而不是另一个时有效?仅供参考,该设备已安装iOS 6.
我创建了这个标题标题,不幸的是我不知道如何在右侧添加一些填充.

这是我的代码:
override func tableView(tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let title: UILabel = UILabel()
title.text = "Days"
title.backgroundColor = UIColor.lightGrayColor()
title.textAlignment = NSTextAlignment.Right
return title
}
Run Code Online (Sandbox Code Playgroud)