设置bar的颜色,setTinColor&setBarTintColor
2013-12-16 13:49
579 查看
在ios7.0中setTinColor不能改变它的背景色,而要用setBarTintColor
/*
The behavior of tintColor for bars has changed on iOS 7.0. It no longer affects the bar's background
and behaves as described for the tintColor property added to UIView.
To tint the bar's background, please use -barTintColor.
*/
if (LY_IOS_VERSION<7.0) {
[self.navBar setTintColor:[UIColor blackColor]];
}
else
{
// [self.navBar setTintColor:[UIColor colorWithRed:161/255.0 green:232/255.0 blue:1.0 alpha:1.0]];
[self.navBar setBarTintColor:[UIColor redColor]];
}
/*
The behavior of tintColor for bars has changed on iOS 7.0. It no longer affects the bar's background
and behaves as described for the tintColor property added to UIView.
To tint the bar's background, please use -barTintColor.
*/
if (LY_IOS_VERSION<7.0) {
[self.navBar setTintColor:[UIColor blackColor]];
}
else
{
// [self.navBar setTintColor:[UIColor colorWithRed:161/255.0 green:232/255.0 blue:1.0 alpha:1.0]];
[self.navBar setBarTintColor:[UIColor redColor]];
}
相关文章推荐
- xcode5使用老控件
- ios7 留白
- 我也来说说扁平化设计
- xcode5 ios7beta编译多余log清除
- [iOS7]IOS7中UITableView的变化
- iOS ios7的一些变化
- ios TableView 移动自动以的tableCell
- ios7 UIAlertView 不能加自己View
- IOS7使用Audio Queue同时进行录音和播放
- 定制iOS 7中的导航栏和状态栏
- 越狱的iphone4升级IOS7报3194问题解决过程
- iOS7 和iOS6的屏幕适配
- iOS7用户界面的改变
- 在IOS7下自定义导航栏和状态栏
- about window.pageYOffset,document.body.scrollTop not working in iOS 7
- uniqueIdentifier在ios7不支持后的替代方法 (未验证)
- ios设备唯一标识获取策略
- iOS的UDID废用以及UUID配合keychain的替换方案实现
- IOS下布局兼容性问题解决
- ASIHttpRequest使用详解(4)