Skip to content

Conversation

@popwarfour
Copy link

Bug
There is a bug where a font attributed is ignored (when using attributedPlaceholder). The UITextView's font is used instead.

Fix
Checks to see if there is font set on the attributed placeholder. If so we use that. If not we fall back and use the UITextView's font instead.

@popwarfour
Copy link
Author

popwarfour commented Jan 4, 2018

your unit tests didn't catch it because you needed to check against the placeholderLabel.font instead. I can update those also if you'd like?

@devxoul
Copy link
Owner

devxoul commented Jan 5, 2018

Hmm, how about just not updating the font if there is attributedPlaceholder? For example:

 if (self.needsUpdateFont) {
-    self.placeholderLabel.font = self.font;
+    if (self.attributedPlaceholer != nil) {
+        self.placeholderLabel.font = self.font;
+    }
     self.needsUpdateFont = NO;
 }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants