[ios] Fixed text field placeholder's color.

This commit is contained in:
VladiMihaylenko 2016-01-29 14:09:20 +03:00 committed by Sergey Yershov
parent 1638325d7e
commit 6dc309a954
2 changed files with 4 additions and 4 deletions

View file

@ -9,10 +9,9 @@
- (void)awakeFromNib
{
self.textField.placeholder = L(@"bookmark_set_name");
self.textField.textColor = [UIColor blackPrimaryText];
UILabel * label = [self.textField valueForKey:@"_placeholderLabel"];
label.textColor = [UIColor blackHintText];
self.textField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:L(@"bookmark_set_name") attributes:
@{NSForegroundColorAttributeName : [UIColor blackHintText]}];
}
#pragma mark - UITextFieldDelegate

View file

@ -29,7 +29,8 @@
self.icon.hidden = isNameCell;
self.backgroundColor = isNameCell ? [UIColor clearColor] : [UIColor white];
self.textField.text = text;
self.textField.placeholder = placeholder;
self.textField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:placeholder attributes:
@{NSForegroundColorAttributeName : [UIColor blackHintText]}];
self.textField.keyboardType = keyboardType;
self.bottomSeparatorLeadingOffset.priority = lastCell ? UILayoutPriorityDefaultHigh : UILayoutPriorityDefaultLow;
}