mirror of
https://github.com/AU-COVIDSafe/mobile-ios.git
synced 2025-04-19 21:15:21 +00:00
COVIDSafe code from version 1.1
This commit is contained in:
commit
3640e52eb2
330 changed files with 261540 additions and 0 deletions
12
CovidSafe/UIElements/UILabelExtension.swift
Normal file
12
CovidSafe/UIElements/UILabelExtension.swift
Normal file
|
@ -0,0 +1,12 @@
|
|||
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
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue