I want to append an Attributed Text with another Attributed Text in Swift. Please provide any sample code for appending operation of two attributed String in Swift.
As per "glace" answer, I just update font attribute and swift version.
let boldFontAttributes = [NSAttributedString.Key.foregroundColor: UIColor.black, NSAttributedString.Key.font: UIFont.boldSystemFont(ofSize: 17)]
let normalFontAttributes = [NSAttributedString.Key.foregroundColor: UIColor.darkGray, NSAttributedString.Key.font: UIFont.systemFont(ofSize: 15)]
let partOne = NSMutableAttributedString(string: "This is an example ", attributes: boldFontAttributes)
let partTwo = NSMutableAttributedString(string: "for the combination of Attributed String!", attributes: normalFontAttributes)
let combination = NSMutableAttributedString()
combination.append(partOne)
combination.append(partTwo)
lblUserName.attributedText = combination