added backgroundImage support

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2022-12-19 10:36:31 -06:00
parent 9150a62e57
commit c0e6436571

View File

@ -75,7 +75,11 @@ open class TileContainer: Control {
//--------------------------------------------------
// MARK: - Private Properties
//--------------------------------------------------
private var backgroundImageView = UIImageView(frame: .zero)
private var backgroundImageView = UIImageView().with {
$0.translatesAutoresizingMaskIntoConstraints = false
$0.contentMode = .scaleAspectFill
$0.clipsToBounds = true
}
private var padding: CGFloat {
switch containerPadding {
@ -129,8 +133,11 @@ open class TileContainer: Control {
highlightView.isUserInteractionEnabled = false
highlightView.isHidden = true
highlightView.backgroundColor = .clear
layer.cornerRadius = cornerRadius
//corner radius
layer.cornerRadius = cornerRadius
backgroundImageView.layer.cornerRadius = 8
}
public override func reset() {