CXTDT-544384 - TileContainer Background Image stretch
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
07d162c5c0
commit
a4b0ffd391
@ -239,12 +239,12 @@ open class TileContainerBase<PaddingType: DefaultValuing>: Control where Padding
|
||||
|
||||
heightConstraint = layoutGuide.heightAnchor.constraint(equalToConstant: 0)
|
||||
|
||||
backgroundImageView
|
||||
.pinTop(layoutGuide.topAnchor)
|
||||
.pinLeading(layoutGuide.leadingAnchor)
|
||||
.pinTrailing(layoutGuide.trailingAnchor)
|
||||
.pinBottom(layoutGuide.bottomAnchor, 0, .defaultLow)
|
||||
backgroundImageView.pinToSuperView()
|
||||
|
||||
backgroundImageView.setContentHuggingPriority(.defaultLow, for: .horizontal)
|
||||
backgroundImageView.setContentHuggingPriority(.defaultLow, for: .vertical)
|
||||
backgroundImageView.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
|
||||
backgroundImageView.setContentCompressionResistancePriority(.defaultLow, for: .vertical)
|
||||
backgroundImageView.isUserInteractionEnabled = false
|
||||
backgroundImageView.isHidden = true
|
||||
|
||||
@ -286,15 +286,6 @@ open class TileContainerBase<PaddingType: DefaultValuing>: Control where Padding
|
||||
highlightView.backgroundColor = hightLightViewColorConfiguration.getColor(self)
|
||||
highlightView.isHidden = !isHighlighted
|
||||
|
||||
if let backgroundImage {
|
||||
backgroundImageView.image = backgroundImage
|
||||
backgroundImageView.isHidden = false
|
||||
backgroundColor = imageFallbackColorConfiguration.getColor(self)
|
||||
} else {
|
||||
backgroundImageView.isHidden = true
|
||||
backgroundColor = backgroundColorConfiguration.getColor(self)
|
||||
}
|
||||
|
||||
layer.borderColor = borderColorConfiguration.getColor(self).cgColor
|
||||
layer.borderWidth = showBorder ? VDSFormControls.borderWidth : 0
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user