- (void)initSearchbar{
self.wineSearchBar.delegate = self; [self.wineSearchBar setScopeBarButtonTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor redColor], NSForegroundColorAttributeName, [UIFont fontWithName:GENERAL_FONT size:13], NSFontAttributeName, nil] forState:UIControlStateNormal];
[self.wineSearchBar setScopeBarButtonTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor whiteColor], NSForegroundColorAttributeName, [UIFont fontWithName:GENERAL_FONT size:13], NSFontAttributeName, nil] forState:UIControlStateSelected];
}

要求:iOS7 +

改动颜色: [UIColor redColor], NSForegroundColorAttributeName

改动字体:[UIFont fontWithName:GENERAL_FONT size:13], NSFontAttributeName

參考来源:http://stackoverflow.com/questions/15385050/color-of-scope-button-text-in-uisearchbar/

最新文章

  1. PHPExcel设置数据格式的几种方法
  2. Android---真机调试时不能识别手机的解决方案
  3. cocos2d-x创建精灵动画方式汇总
  4. Qt 串口编程学习1
  5. 《黄聪:手机移动站SEO优化教程》2、PC端和手机移动端SEO优化区别
  6. Caused by: java.lang.ClassCastException: android.widget.LinearLayout$LayoutParams
  7. 【QT相关】Qt Widgets Module
  8. Express与NodeJs创建服务器的两种方法
  9. wow.js中各种特效对应的类名
  10. 201621123040《Java程序设计》第七周学习总结
  11. A1105. Spiral Matrix
  12. dubbo系列一:dubbo介绍、dubbo架构、dubbo的官网入门使用demo
  13. C++开发者都应该使用的10个C++11特性 转
  14. PHP里面增加写日志功能
  15. sell 项目 订单详情表 设计 及 创建
  16. android 转屏 onConfigurationChanged 不会执行的问题
  17. AOAPC I: Beginning Algorithm Contests (Rujia Liu) Volume 6. Mathematical Concepts and Methods
  18. 接口测试3-3Excel格式
  19. page_address()函数分析--如何通过page取得虚拟地址
  20. spring aop 理解

热门文章

  1. Scala学习-02-方法
  2. Selenium WebDriver-下拉框断言
  3. Matlab 二值图像label regions
  4. Pycharm脚本通用部分设置
  5. linux下终止相关操作
  6. 九度oj 题目1361:翻转单词顺序
  7. 漫谈DNS
  8. 《Spark Python API 官方文档中文版》 之 pyspark.sql (四)
  9. Linux 终端操作之「I/O Redirection」
  10. 如何查找Windows上安装的DB2的端口号Port