update link
This commit is contained in:
parent
b24745fd89
commit
01780e708f
@ -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
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user