IOS 7 - Can't set font color of UITextView in custom UITableView cell IOS 7 - Can't set font color of UITextView in custom UITableView cell ios ios

IOS 7 - Can't set font color of UITextView in custom UITableView cell


After working through the problem a bit I went back to Google armed with the new information and found the following Stack Overflow question:

UITextView font is nil

Turns out if you don't check the 'Selectable' checkbox under the UITextView's attributes it doesn't respond to any font changes, including the color.

I checked this box and now it's all working as expected.

Thanks for your help!


If your UITextView contains text that is detected to be address/phone number/etc, you've got to set tintColor to change text colour of detected items, like this:

self.tvPhone.tintColor = [UIColor blueColor];


I wanted my UITextView "Read Only" but when I uncheck Editable and Selectable the behavior was not what I expected, sometimes the text color was not changing and sometimes the font was reset, so my solution was to check Editable and Selectable and uncheck User Interaction Enabled in interface builder

enter image description here

enter image description here


matomo