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.

2
  • have you make IBOutlet connection for the textview Commented Feb 13, 2014 at 9:21
  • YEs. I see the text in the uitextview. I just don't see the text effects Commented Feb 13, 2014 at 10:50

2 Answers 2

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];
Sign up to request clarification or add additional context in comments.

1 Comment

That is. Thanks for posting.
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 !

1 Comment

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.