我需要在UILabel中显示两行属性字符串,例如,第一行是 theTopMessage
,第二行是 theBottomMessage
. 它们都是NSAttributedStrings .
我使用了以下代码,但我没有得到我想要的 . theTopMessage
和 theBottomMessage
在同一条线上 . 谁能帮我?非常感谢 .
_eventInfoLbl.lineBreakMode = NSLineBreakByWordWrapping;
_eventInfoLbl.numberOfLines = 0;
_eventInfoLbl.attributedText = info(nsattributed string which holds theTopMessage and theBottomMessage);
[_eventInfoLbl sizeToFit];