Reputation: 701
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
Reputation: 901
Try this...
[yourtextview setFont:[UIFont boldSystemFontOfSize:13.0f]];
Upvotes: 6
Reputation: 6323
you have to set font by code
yourtextViewObject.font = [UIFont systemFontOfSize:14];
Upvotes: 7
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