在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]];
}