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”
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。