helper method for setNeedsLayout()

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2023-02-14 13:55:11 -06:00
parent 37346b1f65
commit ecaaf8c229

View File

@ -14,3 +14,11 @@ public protocol ViewProtocol {
func setup()
}
extension ViewProtocol where Self: UIView {
public func removeFromSuperview(_ view: UIView){
if view.superview != nil {
view.removeFromSuperview()
setNeedsDisplay()
}
}
}