@@ -224,15 +224,6 @@ - (CGRect)textRect
224224
225225#pragma mark Placeholder
226226
227- - (void )setDefaultPlaceholderColor : (UIColor *)defaultPlaceholderColor
228- {
229- _defaultPlaceholderColor = defaultPlaceholderColor ?: [UIColor mf_defaultPlaceholderGray ];
230-
231- if (self.attributedPlaceholder .length > 0 ) {
232- self.attributedPlaceholder = [self attributedString: self .attributedPlaceholder withColor: self .defaultPlaceholderColor];
233- }
234- }
235-
236227- (void )setAnimatesPlaceholder : (BOOL )animatesPlaceholder
237228{
238229 _animatesPlaceholder = animatesPlaceholder;
@@ -243,11 +234,13 @@ - (void)setAnimatesPlaceholder:(BOOL)animatesPlaceholder
243234 }
244235}
245236
246- - (void )setPlaceholderFont : (UIFont *)placeholderFont
237+ - (void )setDefaultPlaceholderColor : (UIColor *)defaultPlaceholderColor
247238{
248- _placeholderFont = placeholderFont ?: self.defaultPlaceholderFont ;
249- self.placeholderLabel .font = _placeholderFont;
250- [self updatePlaceholderText ];
239+ _defaultPlaceholderColor = defaultPlaceholderColor ?: [UIColor mf_defaultPlaceholderGray ];
240+
241+ if (self.attributedPlaceholder .length > 0 ) {
242+ self.attributedPlaceholder = [self attributedString: self .attributedPlaceholder withColor: self .defaultPlaceholderColor];
243+ }
251244}
252245
253246- (void )setPlaceholderColor : (UIColor *)placeholderColor
@@ -256,6 +249,13 @@ - (void)setPlaceholderColor:(UIColor *)placeholderColor
256249 [self updatePlaceholderColor ];
257250}
258251
252+ - (void )setPlaceholderFont : (UIFont *)placeholderFont
253+ {
254+ _placeholderFont = placeholderFont ?: self.defaultPlaceholderFont ;
255+ self.placeholderLabel .font = _placeholderFont;
256+ [self updatePlaceholderText ];
257+ }
258+
259259- (UIFont *)defaultPlaceholderFont
260260{
261261 if (!_defaultPlaceholderFont) {
0 commit comments