diff --git a/Riot/Categories/UIButton.swift b/Riot/Categories/UIButton.swift index 0e3af78ef..6f896bb58 100644 --- a/Riot/Categories/UIButton.swift +++ b/Riot/Categories/UIButton.swift @@ -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 + } + } }