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

Cannot set attributed string #78

Closed
HosseinArabbeigi opened this issue Apr 17, 2020 · 1 comment
Closed

Cannot set attributed string #78

HosseinArabbeigi opened this issue Apr 17, 2020 · 1 comment

Comments

@HosseinArabbeigi
Copy link

HosseinArabbeigi commented Apr 17, 2020

Hi there!

Thanks for amazing button library.
I need to to set attributed string but it doesn't work, my attributed string doesn't have any problem I did test it on a UILabel.

What I did try:

let attributsBold = [NSAttributedString.Key.font : UIFont.systemFont(ofSize: 16, weight: .bold)]
let attributsNormal = [NSAttributedString.Key.font : UIFont.systemFont(ofSize: 16, weight: .regular)]
let attributedString = NSMutableAttributedString(string: "Hi ", attributes:attributsNormal)
let boldStringPart = NSMutableAttributedString(string: "John", attributes:attributsBold)
attributedString.append(boldStringPart)
lgButton.attributedString = attributedString
  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS 12]
@stale
Copy link

stale bot commented Jun 16, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs in 7 days. Thank you for your contributions.

@stale stale bot added the stale label Jun 16, 2020
@stale stale bot closed this as completed Jun 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant