diff --git a/MVMCoreUI/Atoms/Buttons/Link.swift b/MVMCoreUI/Atoms/Buttons/Link.swift index 39187ac8..02778bce 100644 --- a/MVMCoreUI/Atoms/Buttons/Link.swift +++ b/MVMCoreUI/Atoms/Buttons/Link.swift @@ -30,25 +30,7 @@ import UIKit //-------------------------------------------------- private var delegateObject: MVMCoreUIDelegateObject? - - //-------------------------------------------------- - // MARK: - Initializers - //-------------------------------------------------- - - public override init(frame: CGRect) { - super.init(frame: frame) - setupView() - } - - public convenience init() { - self.init(frame: .zero) - } - - public required init?(coder: NSCoder) { - super.init(coder: coder) - setupView() - } - + //-------------------------------------------------- // MARK: - Lifecycle //-------------------------------------------------- @@ -95,8 +77,7 @@ extension Link { } public override func setupView() { - - translatesAutoresizingMaskIntoConstraints = false + super.setupView() backgroundColor = .clear contentMode = .redraw setTitleColor(.mfTextButton(), for: .normal) @@ -118,17 +99,17 @@ extension Link: ModelMoleculeViewProtocol { backgroundColor = model.backgroundColor?.uiColor set(with: model.action, delegateObject: delegateObject, additionalData: additionalData) } + + + public static func estimatedHeight(forRow molecule: MoleculeProtocol?, delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? { + return 31.0 + } } // MARK: - MVMCoreUIMoleculeViewProtocol extension Link { - public override func reset() { - super.reset() - setTitleColor(.mfTextButton(), for: .normal) - } - public override func setWithJSON(_ json: [AnyHashable: Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) { super.setWithJSON(json, delegateObject: delegateObject, additionalData: additionalData) self.additionalData = additionalData @@ -164,10 +145,6 @@ extension Link { // MARK: - MVMCoreUIViewConstrainingProtocol extension Link: MVMCoreUIViewConstrainingProtocol { - public func needsToBeConstrained() -> Bool { - return true - } - public func alignment() -> UIStackView.Alignment { return .leading }