glaszig / SZTextView

A drop-in UITextView replacement which gives you: a placeholder.
MIT License
683 stars 102 forks source link

Word wrapping not working for the placeholder #3

Closed akhushraj closed 10 years ago

akhushraj commented 11 years ago

Your code is not wordwrapping the placeholder text. I set my Placeholder text as "Why do you recommend this product?". But as you see in the image, it's getting cut off at "Why do you recommend this".

Can you please fix this.

image

glaszig commented 11 years ago

until i get around handling this, you can try something like the following:

UILabel *placeholderLabel = [textView valueForKey:@"_placeholderLabel"];
placeholderLabel.numberOfLines = 0; 
placeholderLabel.lineBreakMode = UILineBreakModeWordWrap;