How to enable superscripts in NSString?

Is there a way to enable superscript with NSString? For example, I want to write square feet, for example: foot 2 .

+2
source share
1 answer

In this particular case, there is actually a single Unicode character, which is a small “2” written above the line. This is U + 00B2 (upper superscript).

You should be able to do something like:

NSString *aString = [NSString stringWithUTF8String:"foot\u00b2"]; 
+4
source

Source: https://habr.com/ru/post/909174/


All Articles