From 6dc309a95450622c669be59543e540481809da72 Mon Sep 17 00:00:00 2001 From: VladiMihaylenko Date: Fri, 29 Jan 2016 14:09:20 +0300 Subject: [PATCH] [ios] Fixed text field placeholder's color. --- iphone/Maps/Classes/AddSetTableViewCell.mm | 5 ++--- iphone/Maps/Classes/Editor/MWMEditorTextTableViewCell.mm | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/iphone/Maps/Classes/AddSetTableViewCell.mm b/iphone/Maps/Classes/AddSetTableViewCell.mm index 20c3c21607..22454d3b0a 100644 --- a/iphone/Maps/Classes/AddSetTableViewCell.mm +++ b/iphone/Maps/Classes/AddSetTableViewCell.mm @@ -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 diff --git a/iphone/Maps/Classes/Editor/MWMEditorTextTableViewCell.mm b/iphone/Maps/Classes/Editor/MWMEditorTextTableViewCell.mm index 60a2f76123..ce24d5a2d4 100644 --- a/iphone/Maps/Classes/Editor/MWMEditorTextTableViewCell.mm +++ b/iphone/Maps/Classes/Editor/MWMEditorTextTableViewCell.mm @@ -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; }