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 @@ -357,7 +357,8 @@ - (void)updateUnderlineColor
357357 underlineColor = self.errorColor ;
358358 }
359359 else {
360- underlineColor = self.isFirstResponder ? self.tintColor : self.underlineColor ;
360+ UIColor * focusedUnderlineColor = self.focusedUnderlineColor ?: self.tintColor ;
361+ underlineColor = self.isFirstResponder ? focusedUnderlineColor : self.underlineColor ;
361362 }
362363
363364 self.underlineLayer .backgroundColor = underlineColor.CGColor ;
You can’t perform that action at this time.
0 commit comments