fixed bug in flipping colors
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
10f0d35ff2
commit
76454b2771
@ -59,6 +59,17 @@ open class Tilet: TileContainer {
|
||||
// MARK: - Public Properties
|
||||
//--------------------------------------------------
|
||||
private var titleLockup = TitleLockup()
|
||||
open override var surface: Surface {
|
||||
didSet {
|
||||
//flip the color
|
||||
let flippedColor:ContainerBackgroundColor = surface == .dark ? .white : .black
|
||||
containerBackgroundColor = flippedColor
|
||||
|
||||
//flip the surface for the titleLockup
|
||||
let flippedSurface: Surface = surface == .dark ? .light : .dark
|
||||
titleLockup.surface = flippedSurface
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Public Properties
|
||||
@ -87,6 +98,7 @@ open class Tilet: TileContainer {
|
||||
|
||||
open override func setup() {
|
||||
super.setup()
|
||||
surface = .light
|
||||
addContentView(titleLockup)
|
||||
contentViewWithConstraint = titleLockup.widthAnchor.constraint(equalToConstant: width - (padding * 2))
|
||||
contentViewWithConstraint?.isActive = true
|
||||
|
||||
Loading…
Reference in New Issue
Block a user