Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attributed titleLabel not showing #165

Open
zanohikaru7 opened this issue Apr 14, 2020 · 0 comments
Open

Attributed titleLabel not showing #165

zanohikaru7 opened this issue Apr 14, 2020 · 0 comments

Comments

@zanohikaru7
Copy link

zanohikaru7 commented Apr 14, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant