iOS 颜色可以通过的属性来设置,如下:* = [[ alloc] :@"请输入文字"];
iOS placeholder颜色可以通过UITextField的属性attributedPlaceholder来设置,如下:
NSMutableAttributedString *placeholderString = [[NSMutableAttributedString alloc] initWithString:@"请输入文字"];
[placeholderString addAttribute:NSForegroundColorAttributeName value:[UIColor redColor] range:NSMakeRange(0, placeholderString.length)];
textField.attributedPlaceholder = placeholderString;
本站系公益性非盈利分享网址,本文来自用户投稿,不代表码文网立场,如若转载,请注明出处
评论列表(13条)