0

I am trying to display some text in a UITextView (no editable) and I am having some problems to change font size, color...

I am using xcode 5 with ios6 appearance. I tried to change parameters in nib file: arribute inspector> text view.

But all I try, seems to do nothing. Nothing changes, I see the text equal as if I didn't modify anything.

I don't write text inside uitextview, I just show it from a variable.

Biribu
  • 3,615
  • 13
  • 43
  • 79

2 Answers2

1

I had a similar problem before. It got fixed when I did the customization after selecting the entire default text.

Here is a sample screenshot :

enter image description here

Hope this helps !

GoGreen
  • 2,251
  • 1
  • 17
  • 29
  • The problem is that I leave text in blank because I will set other text by code. Anyway, I solved it by setting properties after setting the text. I will post the answer when the page allows me. – Biribu Feb 13 '14 at 12:24
1

I had the same problems and had already an answer here

You need to set the text of your UITextView and after you can set the font and the color :

_myTextView.text = @"text";
[_myTextView setFont:[UIFont fontWithName:@"Helvetica Neue" size:18.0f]];
_myTextView.textColor = [UIColor whiteColor];
Community
  • 1
  • 1
Jordan Montel
  • 8,227
  • 2
  • 35
  • 40