2016-07-03 12 views

答えて

0

あなたは

輸入のUIKitここ

let text = NSMutableAttributedString(string: "Hello") 
text.addAttribute(NSBackgroundColorAttributeName, value: UIColor.grayColor(), range: NSMakeRange(0, text.length)) 
let label = UILabel(frame: CGRect(x: 0, y: 0, width: 60, height: 100)) 
label.textColor = .whiteColor()  
label.attributedText = text 

テキスト強調することができます、それはあなたがこれまでに試してみました何

enter image description here

+0

それは私がそう考えるダイナミックな文字列ではありません –

+0

@NaqashKhalid:どういう意味ですか? –

+0

ありがとうございました。 –

関連する問題