Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
504 views
in Technique[技术] by (71.8m points)

iphone - How to change the uitextview font size

can any one help to change the font size in UITextView.

[textView setFont:[UIFont fontWithName:@"ArialMT" size:30]];

I use this one but it doesn't work.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Have you bind textView with xib or allocated textView?

If yes,

You can use following code to check whether this works

[textView setFont:[UIFont boldSystemFontOfSize:15]];

or

 [textView setFont:[UIFont systemFontOfSize:15]];

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...