iOS学习-UITextField设置placeholder的颜色
2024-10-07 21:17:25
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];
最新文章
- 数字与字母 随机数小demo
- indent guides 格式化代码(添加竖线)
- matlab search path
- js key事件 keyCode大全
- hdu Number Sequence
- leetcode Minimum Depth of Binary Tree python
- Tesseract Ocr引擎
- DOM和BOM
- iOS开发——MD5加密
- 包装一个php的验证码类
- python之socket--粘包补充
- LeetCode 342. Power of Four (4的次方)
- 红米手机4A怎么样刷入开发版获得ROOT权限
- db2常用语句
- Poco::Crypto--加解密(AES)
- tensorflow省钱方案-ml-engine
- Ubuntu下的网络服务
- 如何优化mysql查询速度
- Samba远程代码执行漏洞(CVE-2017-7494)复现
- 边的双联通+缩点+LCA(HDU3686)