// // ViewProtocol.swift // VDS // // Created by Matt Bruce on 7/22/22. // import Foundation import UIKit public protocol ViewProtocol { /// Called once when a view is initialized and is used to Setup additional UI or other constants and configurations. func setup() /// Used to update any Accessibility properties. func updateAccessibility() } extension ViewProtocol where Self: UIView { /// Helper method for removing a superview and updating Self. public func removeFromSuperview(_ view: UIView){ if view.superview != nil { view.removeFromSuperview() setNeedsDisplay() } } }