是否可以在将显示在UITextField和UILabel中的NSString对象中包含指数?如果是这样,我们该怎么做?如果没有,您可能会建议其他选择吗?
最佳答案
正如jrturton中this question回答的那样:
您需要为上标字符添加unicode符号:
NSInteger number = 10;
NSString *cubedSymbol = @"\u00B3";
NSString *tenCubed = [NSString stringWithFormat:@"%d%@",number,cubedSymbol];
here会带来更多乐趣
关于ios - NSString中的指数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14489996/