Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you have two fonts in one UITextView (Xcode)?

I'm trying to make two font styes in one UITextView, how do I do this?

like image 212
miniiphoneprogrammer Avatar asked Dec 28 '22 13:12

miniiphoneprogrammer


2 Answers

From the class reference:

This class does not support multiple styles for text. The font, color, and text alignment attributes you specify always apply to the entire contents of the text view. To display more complex styling in your application, you need to use a UIWebView object and render your content using HTML.

like image 195
James Webster Avatar answered Feb 13 '23 17:02

James Webster


You cannot have two on the same page because it is not supported. Just use a webview and an HTML file

like image 41
iOSprogrammer Avatar answered Feb 13 '23 16:02

iOSprogrammer