Removed line setting title because title won't be part of actionMap in the future

This commit is contained in:
Robinson, Blake 2019-12-19 10:06:54 -05:00
parent 109ef54479
commit 2c5e2286b1
2 changed files with 4 additions and 1 deletions

View File

@ -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],

View File

@ -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)
}