My application uses an UITextView. Now I want the UITextView to have a placeholder similar to the one you can set for an UITextField.
How to do this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I made a few minor modifications to bcd’s solution to allow for initialization from a
Xibfile, text wrapping, and to maintain background color. Hopefully it will save others the trouble.UIPlaceHolderTextView.h:
UIPlaceHolderTextView.m: