remove from superView before adding as a subview
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
bb655eefa2
commit
5570507f27
@ -350,6 +350,7 @@ open class TileContainerBase<PaddingType: DefaultValuing>: Control where Padding
|
|||||||
|
|
||||||
/// This will place a view within the contentView of this component.
|
/// This will place a view within the contentView of this component.
|
||||||
public func addContentView(_ view: UIView, shouldPin: Bool = true) {
|
public func addContentView(_ view: UIView, shouldPin: Bool = true) {
|
||||||
|
view.removeFromSuperview()
|
||||||
containerView.addSubview(view)
|
containerView.addSubview(view)
|
||||||
if shouldPin {
|
if shouldPin {
|
||||||
view.pinToSuperView()
|
view.pinToSuperView()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user