iphone - UISearchBar范围栏色调颜色问题

标签 iphone ios ios4 cocos2d-iphone

在uisearchbar和范围栏上使用时,范围栏的色彩在iOS 4.3中没有更新。在其余的iOS版本中,它的工作正常。

最佳答案

for (id subview in yourSearchDisplayController.searchBar.subviews )
{
    if([subview isMemberOfClass:[UISegmentedControl class]])
    {
        UISegmentedControl *scopeBar=(UISegmentedControl *) subview;
        [scopeBar setSegmentedControlStyle:UISegmentedControlStyleBar];
        [scopeBar setTintColor: [UIColor redColor]];//you can also set RGB color here 
        //scopeBar.tintColor =  [UIColor blackColor];         
    }
}

另请参阅此链接中的我的答案以修改UISearchBar组件

How to change inside background color of UISearchBar component on iOS

关于iphone - UISearchBar范围栏色调颜色问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14121071/

相关文章:

ios - 圆形 UIImageView 在某些设备上是方形的

ipad - Ipad中的PayPal集成

iphone应用程序仅显示在ipad上的小窗口中

iphone - 邮件编辑器在 iPhone 上崩溃

iphone - NSString 有格式字符串解析器吗?

ios - 如何从resumeData的NSURLSessionResumeCurrentRequest添加HTTPHeaderField的值?

ios - 从 Firebase 下载表格 View 中的项目过多

objective-c - Command/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-g++-4.2 失败,退出代码为 1

iphone - 将 VOID 代码转换为 IBAction

ios - Text大于Height时如何增加UITextView的高度