Last Updated: February 25, 2016
·
2.8K
· novalagung

iOS - UITextField's text background color

NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:textField.text];
[attributedString addAttribute:NSBackgroundColorAttributeName value:[UIColor clearColor] range:NSMakeRange(0, textField.text.length)];
textField.attributedText = attributedString;