I needed UITextView where user can enter text in multiple color at the time of inserting. For example if he enter XYZ, then color will be red, if he enter ABC then it must be blue.
Share
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.
This answer was given prior the release of iOS 6 and the support of NSAttributedString in UITextViews.
Sorry this is not possible a UITextView is plain text only. You can only set text and font attributes globally applying to the whole text.
Have a look at UITextView with Syntax Highlighting, it’s related to your situation. The first answer gives you a good overview and some suggestions how to solve your problem.