gpt4 book ai didi

ios - 确保 iOS 中的符号 th 正确显示

转载 作者:行者123 更新时间:2023-11-29 10:59:26 26 4
gpt4 key购买 nike

我的 UILabel 中需要有 19 世纪。但它应该显示为第 1 个符号是上标的 19 世纪。我正在使用 plist 输入标签。如何确保它在 UI 中正确显示?

需要一些指导。

附上图片:enter image description here

最佳答案

使用 Unicode 字符 (U+1D57) 和 ʰ (U+02B0)。

您可以按字面输入这些内容:

NSString *num = @"19 ᵗʰ";

或:

NSString *num = @"19\u1d57\u02b0";

如果这些看起来不够好,最好使用 NSAttributedString

关于ios - 确保 iOS 中的符号 th 正确显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16663770/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com