Corrections made.
This commit is contained in:
parent
0a97774098
commit
8e216f8b90
@ -23,7 +23,7 @@ import UIKit
|
|||||||
// MARK: - Properties
|
// MARK: - Properties
|
||||||
//------------------------------------------------------
|
//------------------------------------------------------
|
||||||
|
|
||||||
var buttomHeaderPadding: CGFloat = PaddingTwo
|
var buttonHeaderPadding: CGFloat = PaddingTwo
|
||||||
|
|
||||||
//------------------------------------------------------
|
//------------------------------------------------------
|
||||||
// MARK: - Constraints
|
// MARK: - Constraints
|
||||||
@ -81,7 +81,7 @@ import UIKit
|
|||||||
header.leadingAnchor.constraint(equalTo: leftContainer.leadingAnchor).isActive = true
|
header.leadingAnchor.constraint(equalTo: leftContainer.leadingAnchor).isActive = true
|
||||||
leftContainer.trailingAnchor.constraint(equalTo: header.trailingAnchor).isActive = true
|
leftContainer.trailingAnchor.constraint(equalTo: header.trailingAnchor).isActive = true
|
||||||
|
|
||||||
buttonTopConstraint = button.topAnchor.constraint(equalTo: header.bottomAnchor, constant: PaddingTwo)
|
buttonTopConstraint = button.topAnchor.constraint(equalTo: header.bottomAnchor, constant: buttonHeaderPadding)
|
||||||
buttonTopConstraint?.isActive = true
|
buttonTopConstraint?.isActive = true
|
||||||
|
|
||||||
button.leadingAnchor.constraint(equalTo: leftContainer.leadingAnchor).isActive = true
|
button.leadingAnchor.constraint(equalTo: leftContainer.leadingAnchor).isActive = true
|
||||||
@ -107,8 +107,8 @@ import UIKit
|
|||||||
button.updateView(size)
|
button.updateView(size)
|
||||||
imageLoader.updateView(size)
|
imageLoader.updateView(size)
|
||||||
leftContainer.updateView(size)
|
leftContainer.updateView(size)
|
||||||
|
|
||||||
buttonTopConstraint?.constant = header.headlineLabel.hasText || header.messageLabel.hasText ? PaddingTwo : 0
|
buttonTopConstraint?.constant = header.hasText() ? PaddingTwo : 0
|
||||||
}
|
}
|
||||||
|
|
||||||
public override static func estimatedHeight(forRow json: [AnyHashable: Any]?, delegateObject: MVMCoreUIDelegateObject?) -> CGFloat {
|
public override static func estimatedHeight(forRow json: [AnyHashable: Any]?, delegateObject: MVMCoreUIDelegateObject?) -> CGFloat {
|
||||||
@ -127,7 +127,7 @@ import UIKit
|
|||||||
button.isHidden = false
|
button.isHidden = false
|
||||||
imageLoader.imageView.contentMode = .scaleAspectFit
|
imageLoader.imageView.contentMode = .scaleAspectFit
|
||||||
imageLoader.addSizeConstraintsForAspectRatio = true
|
imageLoader.addSizeConstraintsForAspectRatio = true
|
||||||
buttomHeaderPadding = PaddingTwo
|
buttonHeaderPadding = PaddingTwo
|
||||||
}
|
}
|
||||||
|
|
||||||
override open func reset() {
|
override open func reset() {
|
||||||
@ -156,8 +156,8 @@ import UIKit
|
|||||||
|
|
||||||
guard let dictionary = json else { return }
|
guard let dictionary = json else { return }
|
||||||
|
|
||||||
if let padding = dictionary.optionalCGFloatForKey("buttomHeaderPadding") {
|
if let padding = dictionary.optionalCGFloatForKey("buttonHeaderPadding") {
|
||||||
buttomHeaderPadding = padding
|
buttonHeaderPadding = padding
|
||||||
}
|
}
|
||||||
|
|
||||||
header.setWithJSON(dictionary.optionalDictionaryForKey("headlineBody"), delegateObject: delegateObject, additionalData: additionalData)
|
header.setWithJSON(dictionary.optionalDictionaryForKey("headlineBody"), delegateObject: delegateObject, additionalData: additionalData)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user