mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-28 23:32:41 +00:00
UIButton: Add shortcut to button label property adjustsFontForContentSizeCategory
.
This commit is contained in:
parent
c7bf8a79ce
commit
4cdca960b3
1 changed files with 11 additions and 0 deletions
|
@ -40,4 +40,15 @@ extension UIButton {
|
|||
let image = UIImage.vc_image(from: color)
|
||||
self.setBackgroundImage(image, for: state)
|
||||
}
|
||||
|
||||
/// Shortcut to button label property `adjustsFontForContentSizeCategory`
|
||||
@IBInspectable
|
||||
var vc_adjustsFontForContentSizeCategory: Bool {
|
||||
get {
|
||||
return self.titleLabel?.adjustsFontForContentSizeCategory ?? false
|
||||
}
|
||||
set {
|
||||
self.titleLabel?.adjustsFontForContentSizeCategory = newValue
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue