如何在UILabel中将第三个幂/立方体字符的上标显示为字符串? [英] How to display superscript for third power/cube characters as a string in UILabel?

查看:75
本文介绍了如何在UILabel中将第三个幂/立方体字符的上标显示为字符串?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试找到它的解决方案并且混淆了如何在UILabel中显示第三个电源/立方体。我试图在之前提出的问题中找到答案,但没有一个是有用的。

I'm trying to find solution for it and confused how do I display third power/ cube in a UILabel. I tried to find answer in previously asked question but none of them were useful.

我试图得到答案的问题:

Questions i tried to get answers :

how-to-show-superscript-for-registered-symbol

UILabel和上标

如果我必须使用unichars,我如何将它们用于Superscripts?

If I have to use unichars how do I use them for Superscripts??

谢谢..

推荐答案

您需要为上标三个包含unicode符号:

You need to include the unicode symbol for a superscripted three:

NSInteger number = 10;
NSString *cubedSymbol = @"\u00B3";
NSString *tenCubed = [NSString stringWithFormat:@"%d%@",number,cubedSymbol];

要获得更多乐趣其他

这篇关于如何在UILabel中将第三个幂/立方体字符的上标显示为字符串?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆