diff --git a/MVMCoreUI/Atoms/Buttons/Link.swift b/MVMCoreUI/Atoms/Buttons/Link.swift index 068227b7..7c78e349 100644 --- a/MVMCoreUI/Atoms/Buttons/Link.swift +++ b/MVMCoreUI/Atoms/Buttons/Link.swift @@ -10,10 +10,6 @@ import UIKit @objcMembers open class Link: MFCustomButton { - private lazy var sizeObject: MFSizeObject? = { - return MFSizeObject(standardSize: 30, standardiPadPortraitSize: 36, iPadProLandscapeSize: 42) - }() - private var additionalData: [AnyHashable: Any]? private var delegateObject: MVMCoreUIDelegateObject? @@ -71,11 +67,6 @@ extension Link: MVMCoreViewProtocol { width = MVMCoreUIUtility.getWidth() } self.titleLabel?.font = MFStyler.fontB2(forWidth: width) - guard let heightConstraint = self.heightConstraint else { return } - if !MVMCoreGetterUtility.fequal(a: 0, b: Float(heightConstraint.constant)) { - guard let sizeObject = self.sizeObject else { return } - self.heightConstraint?.constant = sizeObject.getValueBased(onSize: width) - } }) } @@ -88,13 +79,6 @@ extension Link: MVMCoreViewProtocol { // left alignment by default titleLabel?.textAlignment = .left contentHorizontalAlignment = .left - - if let constant = sizeObject?.standardSize { - let heightConstraint = NSLayoutConstraint(item: self as Any, attribute: .height, relatedBy: .equal, toItem: nil, attribute: .notAnAttribute, multiplier: 1.0, constant: constant) - addConstraint(heightConstraint) - heightConstraint.isActive = true - self.heightConstraint = heightConstraint - } } } @@ -122,14 +106,6 @@ extension Link: MVMCoreUIMoleculeViewProtocol { isEnabled = enabled } } - - if let title = title(for: .normal), - title.isEmpty { - heightConstraint?.constant = 0 - } else { - guard let standardSize = sizeObject?.standardSize else { return } - heightConstraint?.constant = standardSize - } } public static func estimatedHeight(forRow json: [AnyHashable: Any]?, delegateObject: MVMCoreUIDelegateObject?) -> CGFloat {