UILabel和上标 [英] UILabel and superscript
问题描述
我有两个字符串:
- 一段长度可变的文本
- 另一个带有数字的字符串 指向参考
- a variable length piece of text
- another string with numbers that point to a reference
在我看来,第一段文字显示在UILabel中,我调整标签的大小以适应文字的大小.这意味着我不能只能在屏幕上放置另一个UILabel,至少不能不重新放置它...
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!
推荐答案
我比较狡猾的解决方案是为上标数字输入unicode字符.
My rather dodgy solution was to enter unicode characters for the superscripted numbers.
这不是一个很好的解决方案,但确实有效.
Not a great solution but it worked.
这篇关于UILabel和上标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!