iOS学习-UITextField设置placeholder的颜色
2023-09-14 10:17:32
UITextField *text = [[UITextField alloc] initWithFrame:CGRectMake(, , , )];
text.borderStyle = UITextBorderStyleRoundedRect; NSMutableAttributedString * attributedStr = [[NSMutableAttributedString alloc]initWithString:@"密码"];
[attributedStr addAttribute:NSForegroundColorAttributeName value:[UIColor redColor] range:NSMakeRange(, attributedStr.length)];
text.attributedPlaceholder = attributedStr; [self.view addSubview:text];
最新文章
- C#字符串截取
- 云计算三种服务模式SaaS、PaaS和IaaS及其之间关系(顺带CaaS、MaaS)
- 【Java基础】用LinkedList实现一个简单栈的功能
- Junit4学习笔记
- 《python基础教程》笔记之 字符串
- ES6新特性-------解构、参数、模块和记号(续)
- rpm安装软件(需管理员权限)
- SpringMVC配置实例
- 四大组件之 BroadcastReceiver小结
- 表示一个文件的 File 类型
- Vue中实现与后台的数据交换(vue-resource)
- React-菜鸟学习笔记(二)
- Open Live Writer安装教程
- (转)websphere线程池 连接池设置
- 崩 oj 1768 最大子矩阵
- Scala学习笔记——内建控制结构
- s21day02 python笔记
- JDBC封装
- django练习题
- Sahi (1) —— 快速入门(101 Tutorial)
热门文章
- SQLServer2005+获取表结构信息
- 移动端图片随手势移动react组件(附移动开发小tips)
- 学习笔记 HTTP参数污染注入
- ArcGIS Engine开发之地图导出
- 30分钟让网站支持HTTPS
- Android 从零开始打造异步处理框架
- 关于jni编译32位、64位动态库(Android.mk和Application.mk文件)
- 【代码笔记】iOS-UILable高度自适应(sizeWithFont)
- 原创 C++应用程序在Windows下的编译、链接(四)动态链接
- postgresql 导出数据字典文档