mirror of
https://github.com/AU-COVIDSafe/mobile-ios.git
synced 2025-01-19 01:06:35 +00:00
12 lines
469 B
Swift
12 lines
469 B
Swift
import UIKit
|
|
|
|
extension UILabel {
|
|
func semiBold(text: String) {
|
|
guard let lblTxt = self.text,
|
|
let range = lblTxt.range(of: text) else { return }
|
|
let nsRange = NSRange(range, in: lblTxt)
|
|
let attrString = NSMutableAttributedString(string: lblTxt)
|
|
attrString.addAttribute(NSAttributedString.Key.font, value: UIFont.systemFont(ofSize: 16, weight: .semibold), range: nsRange)
|
|
self.attributedText = attrString
|
|
}
|
|
}
|