Changes to ensure line does not stretch
This commit is contained in:
parent
e5e17a286d
commit
c3503edecb
@ -18,6 +18,22 @@ import VDS
|
|||||||
open var delegateObject: MVMCoreUIDelegateObject?
|
open var delegateObject: MVMCoreUIDelegateObject?
|
||||||
open var additionalData: [AnyHashable : Any]?
|
open var additionalData: [AnyHashable : Any]?
|
||||||
|
|
||||||
|
open override var orientation: Line.Orientation {
|
||||||
|
didSet {
|
||||||
|
if orientation == .horizontal {
|
||||||
|
setContentHuggingPriority(.defaultLow, for: .horizontal)
|
||||||
|
setContentHuggingPriority(.required, for: .vertical)
|
||||||
|
setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
|
||||||
|
setContentCompressionResistancePriority(.required, for: .vertical)
|
||||||
|
} else {
|
||||||
|
setContentHuggingPriority(.required, for: .horizontal)
|
||||||
|
setContentHuggingPriority(.defaultLow, for: .vertical)
|
||||||
|
setContentCompressionResistancePriority(.required, for: .horizontal)
|
||||||
|
setContentCompressionResistancePriority(.defaultLow, for: .vertical)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Initializer
|
// MARK: - Initializer
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user