diff --git a/MVMCoreUI/Atoms/Buttons/Button.swift b/MVMCoreUI/Atoms/Buttons/Button.swift index cd93f755..77a790fc 100644 --- a/MVMCoreUI/Atoms/Buttons/Button.swift +++ b/MVMCoreUI/Atoms/Buttons/Button.swift @@ -28,7 +28,6 @@ public typealias ButtonBlock = (Button) -> Void self.actionMap = actionMap self.titleLabel?.numberOfLines = 0 self.titleLabel?.lineBreakMode = .byWordWrapping - setTitle(actionMap?.stringForkey(KeyTitle), for: .normal) if let actionMap = self.actionMap, let disableButtonAsAny = actionMap[KeyDisableButton], diff --git a/MVMCoreUI/Atoms/Buttons/CaretButton.swift b/MVMCoreUI/Atoms/Buttons/CaretButton.swift index f1b391d8..86f1185e 100644 --- a/MVMCoreUI/Atoms/Buttons/CaretButton.swift +++ b/MVMCoreUI/Atoms/Buttons/CaretButton.swift @@ -119,6 +119,10 @@ open class CaretButton: Button, MVMCoreUIMoleculeViewProtocol, MVMCoreUIViewCons guard let dictionary = json else { return } + if let title = dictionary.optionalStringForKey(KeyTitle) { + setTitle(title, for: .normal) + } + if let backgroundColorHex = dictionary[KeyBackgroundColor] as? String { backgroundColor = UIColor.mfGet(forHex: backgroundColorHex) }