MayurCM
MayurCM

Reputation: 701

I want to change UITextView's font size

I have used UITextView in my application. Now this might be a dumb question but how can I change the font size of text in it.

if any1 can help with this would be appreciated.

thanks

Upvotes: 1

Views: 5371

Answers (3)

Anshul Jain
Anshul Jain

Reputation: 901

Try this...

[yourtextview setFont:[UIFont boldSystemFontOfSize:13.0f]];

Upvotes: 6

Narayana Rao Routhu
Narayana Rao Routhu

Reputation: 6323

you have to set font by code

yourtextViewObject.font = [UIFont systemFontOfSize:14];

Upvotes: 7

Chris Parker
Chris Parker

Reputation: 1252

UITextView has a read-write font property declared:

@property(nonatomic,retain) UIFont *font;

The UIFont class declares a factory method:

+ (UIFont *)fontWithName:(NSString *)fontName size:(CGFloat)fontSize;

So create a new UIFont instance and then call -setFont: on your UITextView with the font instance.

Upvotes: 2

Related Questions