sdisyw
Last Updated: February 25, 2016
·
1.908K
· 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;