mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-03 14:46:56 +02:00
UIButton: Add shortcut to button label property adjustsFontForContentSizeCategory.
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user