remove from superView before adding as a subview

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2024-04-24 16:56:47 -05:00
parent bb655eefa2
commit 5570507f27

View File

@ -350,6 +350,7 @@ open class TileContainerBase<PaddingType: DefaultValuing>: Control where Padding
/// This will place a view within the contentView of this component.
public func addContentView(_ view: UIView, shouldPin: Bool = true) {
view.removeFromSuperview()
containerView.addSubview(view)
if shouldPin {
view.pinToSuperView()