File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -60,6 +60,11 @@ IB_DESIGNABLE
6060 */
6161@property (nonatomic ) IBInspectable UIColor *underlineColor;
6262
63+ /* *
64+ * The color of the underline when the text field is in focus.
65+ */
66+ @property (nonatomic ) IBInspectable UIColor *focusedUnderlineColor;
67+
6368/* *
6469 * To display an error under the text field, provide an NSError with a localized description.
6570 *
Original file line number Diff line number Diff line change @@ -363,7 +363,8 @@ - (void)updateUnderlineColor
363363 underlineColor = self.errorColor ;
364364 }
365365 else {
366- underlineColor = self.isFirstResponder ? self.tintColor : self.underlineColor ;
366+ UIColor * focusedUnderlineColor = self.focusedUnderlineColor ?: self.tintColor ;
367+ underlineColor = self.isFirstResponder ? focusedUnderlineColor : self.underlineColor ;
367368 }
368369
369370 self.underlineLayer .backgroundColor = underlineColor.CGColor ;
You can’t perform that action at this time.
0 commit comments