Commit b83c2091 by Orkhan Alikhanov

Prevent Button.titleLabel.font overriding storyboard value

parent 23d3045d
...@@ -179,7 +179,9 @@ open class Button: UIButton, Pulseable, PulseableLayer, Themeable { ...@@ -179,7 +179,9 @@ open class Button: UIButton, Pulseable, PulseableLayer, Themeable {
*/ */
public override init(frame: CGRect) { public override init(frame: CGRect) {
super.init(frame: frame) super.init(frame: frame)
/// Set these here to avoid overriding storyboard values
tintColor = Color.blue.base tintColor = Color.blue.base
titleLabel?.font = Theme.font.regular(with: fontSize)
prepare() prepare()
} }
...@@ -274,7 +276,6 @@ open class Button: UIButton, Pulseable, PulseableLayer, Themeable { ...@@ -274,7 +276,6 @@ open class Button: UIButton, Pulseable, PulseableLayer, Themeable {
*/ */
open func prepare() { open func prepare() {
contentScaleFactor = Screen.scale contentScaleFactor = Screen.scale
titleLabel?.font = Theme.font.regular(with: fontSize)
prepareVisualLayer() prepareVisualLayer()
preparePulse() preparePulse()
applyCurrentTheme() applyCurrentTheme()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment