Oleksandr Matrosov
Oleksandr Matrosov

Reputation: 27153

Setting text for UITextView causes reset to default font and color issue

I am using auto layout for a month and this is a pain in my head. By some reasons if I set text to my textview that has constraints, App shows me not the same color and font as I set in storyboard, but seems default.

I am not sure if this simulator issue maybe?

I set text programmatically in -viewDidLoad

If I not set text in viewDidLoad:

enter image description here

If I set text in viewDidLoad:

enter image description here

Upvotes: 1

Views: 899

Answers (1)

Oleksandr Matrosov
Oleksandr Matrosov

Reputation: 27153

I found the issue if I uncheck Selectable checkbox in storyboard for UITextView then it causes this issue if I set text form the code. When I mark it checked again then it resolves my issue.

enter image description here

Upvotes: 7

Related Questions