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