Bold & Non-Bold Text In A Single UILabel?
Update In Swift we don’t have to deal with iOS5 old stuff besides syntax is shorter so everything becomes really simple: Swift 5 func attributedString(from string: String, nonBoldRange: NSRange?) -> NSAttributedString { let fontSize = UIFont.systemFontSize let attrs = [ NSAttributedString.Key.font: UIFont.boldSystemFont(ofSize: fontSize), NSAttributedString.Key.foregroundColor: UIColor.black ] let nonBoldAttribute = [ NSAttributedString.Key.font: UIFont.systemFont(ofSize: fontSize), ] let … Read more