Created
March 3, 2019 09:47
-
-
Save nekonora/e593d0b0a3aeb8c81fe4f81fb927ebc6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let attributedText = NSMutableAttributedString( | |
string: "First string", | |
attributes: [NSAttributedString.Key.font: UIFont.systemFont(ofSize: 14, weight: .semibold)]) | |
attributedText.append(NSAttributedString( | |
string: "Bold string", | |
attributes: [NSAttributedString.Key.font: UIFont.systemFont(ofSize: 14, weight: .heavy)])) | |
attributedText.append(NSAttributedString( | |
string: "Last string.", | |
attributes: [NSAttributedString.Key.font: UIFont.systemFont(ofSize: 14, weight: .semibold)])) | |
myLabel.attributedText = attributedText |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment