diff --git a/MVMCoreUI/Atoms/Buttons/Button.swift b/MVMCoreUI/Atoms/Buttons/Button.swift index 21a9b227..1d5d743e 100644 --- a/MVMCoreUI/Atoms/Buttons/Button.swift +++ b/MVMCoreUI/Atoms/Buttons/Button.swift @@ -74,9 +74,6 @@ public typealias ButtonBlock = (Button) -> () public func setWithActionMap(_ actionMap: [AnyHashable: Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) { self.actionMap = actionMap - titleLabel?.numberOfLines = 0 - titleLabel?.lineBreakMode = .byWordWrapping - buttonDelegate = delegateObject?.buttonDelegate addBlock(event: .touchUpInside) { [weak self] sender in @@ -122,6 +119,8 @@ extension Button: MVMCoreViewProtocol { translatesAutoresizingMaskIntoConstraints = false insetsLayoutMarginsFromSafeArea = false + titleLabel?.numberOfLines = 0 + titleLabel?.lineBreakMode = .byWordWrapping } }