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

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

  • 相关阅读:
    个人笔记 给hover 伪类 恢复默认值
    vue 正则判断
    音乐播放器封装
    jq封装插件,简单dome
    功能齐全轮播
    vue 前端判断输入框不能输入0 空格。特殊符号。
    jq 下拉框
    IPC : 进程间通信方式
    内存
    const char* str 与char str[10]
  • 原文地址:https://www.cnblogs.com/ycq-firstBlood/p/4763778.html
Copyright © 2011-2022 走看看