我想包括天气报告的“度”符号为45度C。如何在字符串中添加度符号以包括UILabel?
如果有人知道,请分享给我。
谢谢。
发布于 2010-05-07 01:57:12
Shift-option-8?
发布于 2016-02-02 15:27:31
在Swift中
cell.lblTemperature.text = NSString(format:"23%@", "\u{00B0}") as String
发布于 2015-02-18 23:16:47
NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:@"80\u00b0c"];
[attributedString setAttributes:@{NSFontAttributeName : [UIFont fontWithName:@"Helvetica-light" size:10.0]
, NSBaselineOffsetAttributeName : @22} range:NSMakeRange(2, 2)];
//asign this as a
examplelabel.attributedtext = attributedString;
https://stackoverflow.com/questions/2783248
复制相似问题