我为我的 UIToolBar 设置了 tintcolor。它在 ios 6.0 中正确显示,但在 ios 5.0 模拟器上显示为黑色。我的代码在这里
originalBounds = mysearchBarBarItem.customView.bounds;
mySearchBar.bounds = CGRectMake(0,0,215,44);
myTopToolbar.tintColor = [UIColor colorWithPatternImage:[UIImage imageNamed:NAVIGATION_BAR_BACKGROUND]];
myTopToolbar.barStyle = UIBarStyleDefault;
mySearchBar.barStyle = UIBarStyleDefault;
mySearchBar.tintColor = [UIColor colorWithPatternImage:[UIImage imageNamed:NAVIGATION_BAR_BACKGROUND]];
[myTopToolbar setItems:toolBarItemsArray animated:YES];