Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to display superscript for third power/cube characters as a string in 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 and superscript

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

Thanks..

like image 284
rohan-patel Avatar asked Dec 02 '22 01:12

rohan-patel


1 Answers

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

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

Plenty more fun is to be had here

like image 118
jrturton Avatar answered Dec 06 '22 23:12

jrturton