I have to set the font size and font family of a dynamically created textView, so that it gives same appearance as the one generated using Interface builder. Any idea how to do this?
UITextView *textView
...
[textView setFont:[UIFont fontWithName:@"ArialMT" size:16]]
You try this
[textView setFont:[UIFont systemFontOfSize:15]];
or
[textView setFont:[UIFont boldSystemFontOfSize:15]];
or you want to give fontname and size then you try this
[textView setFont:[UIFont fontWithName:@"arial" size:16]]
There is a property called font in UITextView,
@property(nonatomic, retain) UIFont *font
You can do like this:
yourTextView.font = builderTextView.font
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With