zoukankan      html  css  js  c++  java
  • iOS UISearchBar 设置光标颜色和取消按钮颜色

    这个问题其实可以取个巧路,大家都知道设置SearchBar的tintcolor的方法

    searchBar.tintColor = [UIColor blueColor];

        [[UIBarButtonItem appearanceWhenContainedIn:[UISearchBar class], nil]

                             setTitleTextAttributes:

                             [NSDictionary dictionaryWithObjectsAndKeys:

                                                            [UIColor whiteColor],

                                                            UITextAttributeTextColor,

                                                            [NSValue valueWithUIOffset:UIOffsetMake(0, 1)],

                                                            UITextAttributeTextShadowOffset,nil]

                                           forState:UIControlStateNormal];

    如此,取消按钮的颜色即为想要的颜色了!

  • 相关阅读:
    前端必备书籍
    搜索引擎的使用技巧
    PS切图
    css背景透明
    前端
    连接查询,A连B,B筛选出多条记录时,选用第一条记录
    mssql 过滤重复记录,取第一笔记录
    MongoDB 日常操作
    OEE计算
    Aspose.Cells: excel 转 pdf
  • 原文地址:https://www.cnblogs.com/ycq-firstBlood/p/4763778.html
Copyright © 2011-2022 走看看