add logic for height

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2023-01-04 11:30:04 -06:00
parent 410ee5afdf
commit b74954dd25

View File

@ -82,8 +82,10 @@ open class TileContainer: Control {
set {
if newValue > 100 {
_width = newValue
didChange()
} else {
_width = 100
}
didChange()
}
}
@ -270,7 +272,7 @@ open class TileContainer: Control {
containerBottomConstraint?.constant = -padding
containerTrailingConstraint?.constant = -padding
if aspectRatio == .none {
if aspectRatio == .none && height == nil{
widthConstraint?.constant = width
heightConstraint?.isActive = false
heightGreaterThanConstraint?.isActive = true