objective-c - iOS开发,一个label里有数字有汉字,怎样让数字的font比汉字大
巴扎黑
巴扎黑 2017-04-18 09:42:17
0
2
647

能否用富文本吗?怎样实现,比如说 “1时1分1秒” 怎样让里面的“1”显示为14像素,汉字显示为12像素

巴扎黑
巴扎黑

reply all(2)
左手右手慢动作

Use rich text NSMutableAttributedString

洪涛

You can use rich text to get the NSMutableAttributedString object through rich text. For UILabel, an attribute is provided@property(nullable, nonatomic,copy) NSAttributedString *attributedText
Just assign the generated NSMutableAttributedString object to the attribute of attributedText directly.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template