Biribu
Biribu

Reputation: 3823

Change text parameters in UITextView

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.

Upvotes: 0

Views: 145

Answers (2)

Jordan Montel
Jordan Montel

Reputation: 8247

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];

Upvotes: 1

GoGreen
GoGreen

Reputation: 2251

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 !

Upvotes: 1

Related Questions