Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UILabel and superscript

I have two strings:

  • a variable length piece of text
  • another string with numbers that point to a reference

In my view, the first piece of text is displayed in a UILabel, I adjust the size of the label to accomodate the size of the text. This means I cannot just place another UILabel on the screen, at least not without repositioning it...somehow.

I need to be able to put the second piece of text so it appears to be at the end of the sentence - and superscripted

I really have no idea how to achieve this!

like image 996
Chris James Avatar asked Feb 28 '23 12:02

Chris James


1 Answers

My rather dodgy solution was to enter unicode characters for the superscripted numbers.

Not a great solution but it worked.

like image 187
Chris James Avatar answered Mar 06 '23 20:03

Chris James