iOS textField 水印字体大小 颜色设置 ..Butt
作者:
WS_0909 | 来源:发表于
2018-04-03 16:49 被阅读0次NSString * holderText = @"请输入原密码";
NSMutableAttributedString *placeholder = [[NSMutableAttributedString alloc] initWithString:holderText]; [placeholder addAttribute:NSForegroundColorAttributeName value:kRGB_HEX(0x1F2936) range:NSMakeRange(0, holderText.length)];
[placeholder addAttribute:NSFontAttributeName value:[UIFont boldSystemFontOfSize:16] range:NSMakeRange(0, holderText.length)];
_old_pw_TF.attributedPlaceholder = placeholder;
//UIbutton的换行显示
button.titleLabel.lineBreakMode = NSLineBreakByWordWrapping;
//然后如同title的内容用包含“\n”就会换行
title = @“123\n666”
本文标题:iOS textField 水印字体大小 颜色设置 ..Butt
本文链接:https://www.haomeiwen.com/subject/jsrchftx.html
网友评论