Code changes
This commit is contained in:
parent
20f62ce4c5
commit
b037d23adb
@ -43,9 +43,12 @@ import Foundation
|
|||||||
leftConstraintHeadline = headlineBody.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: padding)
|
leftConstraintHeadline = headlineBody.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: padding)
|
||||||
leftConstraintHeadline?.isActive = true
|
leftConstraintHeadline?.isActive = true
|
||||||
headlineBody.topAnchor.constraint(equalTo: view.topAnchor, constant: PaddingDefault).isActive = true
|
headlineBody.topAnchor.constraint(equalTo: view.topAnchor, constant: PaddingDefault).isActive = true
|
||||||
let headLineBodyWidth = min((MVMCoreUISplitViewController.getDetailViewWidth() * 0.85), maxWidth)
|
|
||||||
headlineBody.widthAnchor.constraint(lessThanOrEqualToConstant: headLineBodyWidth).isActive = true
|
let headLineBodyWidth = headlineBody.widthAnchor.constraint(equalTo: view.widthAnchor, multiplier: 0.85)
|
||||||
|
headLineBodyWidth.priority = .defaultHigh
|
||||||
|
headLineBodyWidth.isActive = true
|
||||||
|
headlineBody.widthAnchor.constraint(lessThanOrEqualToConstant: maxWidth).isActive = true
|
||||||
|
|
||||||
spaceBetweenViews = caretButton.topAnchor.constraint(greaterThanOrEqualTo: headlineBody.bottomAnchor, constant: spaceBetweenConstant)
|
spaceBetweenViews = caretButton.topAnchor.constraint(greaterThanOrEqualTo: headlineBody.bottomAnchor, constant: spaceBetweenConstant)
|
||||||
spaceBetweenViews?.isActive = true
|
spaceBetweenViews?.isActive = true
|
||||||
|
|
||||||
@ -67,16 +70,7 @@ import Foundation
|
|||||||
NSLayoutConstraint.constraintPinSubview(toSuperview: backgroundImageView)
|
NSLayoutConstraint.constraintPinSubview(toSuperview: backgroundImageView)
|
||||||
view.sendSubviewToBack(backgroundImageView)
|
view.sendSubviewToBack(backgroundImageView)
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Constraining
|
|
||||||
public func setSpacing() {
|
|
||||||
if headlineBody.hasText() && (caretButton.titleLabel?.text?.count ?? 0) > 0 {
|
|
||||||
spaceBetweenViews?.constant = spaceBetweenConstant
|
|
||||||
} else {
|
|
||||||
spaceBetweenViews?.constant = 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// MARK: - MVMCoreUIMoleculeViewProtocol
|
// MARK: - MVMCoreUIMoleculeViewProtocol
|
||||||
open override func setWithJSON(_ json: [AnyHashable: Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) {
|
open override func setWithJSON(_ json: [AnyHashable: Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) {
|
||||||
super.setWithJSON(json, delegateObject: delegateObject, additionalData: additionalData)
|
super.setWithJSON(json, delegateObject: delegateObject, additionalData: additionalData)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user