DavydLiu / DLRadioButton

Radio Button for iOS
MIT License
948 stars 202 forks source link

Attributed titleLabel not showing #165

Open zanohikaru7 opened 4 years ago

zanohikaru7 commented 4 years ago
let radioButton = DLRadioButton()
let attrBold = [NSAttributedString.Key.font : UIFont.systemFont(ofSize: 16, weight: .bold)]
let attrNormal = [NSAttributedString.Key.font : UIFont.systemFont(ofSize: 16, weight: .regular)]
let attrString = NSMutableAttributedString(string: "Text a code to my number ending in ", attributes:attrNormal)

let boldStringPart = NSMutableAttributedString(string: value, attributes: attrBold)
attributedString.append(boldStringPart)

radioButton.titleLabel?.attributedText = attributedString

The text is not showing

Here is the image:

image