问题
Is there any way I can include a superscript with NSString? For example, I want to write square feet, like this: foot2.
回答1:
In this particular case, there is in fact a single Unicode character that represents a small "2" written above the line. It is U+00B2 (Superscript Two).
You should be able to do something like:
NSString *aString = [NSString stringWithUTF8String:"foot\u00b2"];
来源:https://stackoverflow.com/questions/9284077/how-do-i-include-superscripts-in-nsstring