File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,6 +38,11 @@ IB_DESIGNABLE
3838 */
3939@property (nonatomic ) IBInspectable UIColor *placeholderColor;
4040
41+ /* *
42+ * The color of the placeholder label when the text field is in focus.
43+ */
44+ @property (nonatomic ) IBInspectable UIColor *focusedPlaceholderColor;
45+
4146/* *
4247 * Defaults to the first applicable font:
4348 * - the attributed placeholder font at the default placeholder size
Original file line number Diff line number Diff line change @@ -502,7 +502,8 @@ - (void)updatePlaceholderColor
502502 UIColor *color;
503503
504504 if (self.isFirstResponder ) {
505- color = (self.hasError ) ? self.errorColor : self.tintColor ;
505+ UIColor * focusedPlaceHolderColor = self.focusedPlaceholderColor ?: self.tintColor ;
506+ color = (self.hasError ) ? self.errorColor : focusedPlaceHolderColor;
506507 }
507508 else {
508509 color = self.placeholderColor ;
You can’t perform that action at this time.
0 commit comments