Created
December 15, 2021 07:11
-
-
Save hanfengs/3c0bd681651ddc8016ac9a5a7635b076 to your computer and use it in GitHub Desktop.
[swift的AttributedString用法]
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 descString = "delete_account_check_des".localization as NSString | |
let range = descString.range(of: "DELETE") | |
let attributes = NSMutableAttributedString(string: descString as String) | |
attributes.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor(red: 255, green: 0, blue: 8), range: range) | |
deleteTyptDescLable.attributedText = attributes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment