diff --git a/MVMCoreUI/Containers/Views/Container.swift b/MVMCoreUI/Containers/Views/Container.swift index e3512bab..5b2e83eb 100644 --- a/MVMCoreUI/Containers/Views/Container.swift +++ b/MVMCoreUI/Containers/Views/Container.swift @@ -53,31 +53,28 @@ open class Container: View, ContainerProtocol { open func constrainView(_ view: UIView) { containerHelper.constrainView(view) } -} -// MARK: - MVMCoreViewProtocol -public extension Container { - - override func updateView(_ size: CGFloat) { + // MARK: - MVMCoreViewProtocol + open override func updateView(_ size: CGFloat) { super.updateView(size) (view as? MVMCoreViewProtocol)?.updateView(size) containerHelper.updateViewMargins(self, model: containerModel, size: size) } - + /// Will be called only once. - override func setupView() { + open override func setupView() { super.setupView() isAccessibilityElement = false backgroundColor = .clear } - - func addAndContain(_ view: UIView) { + + open func addAndContain(_ view: UIView) { view.translatesAutoresizingMaskIntoConstraints = false addSubview(view) containerHelper.constrainView(view) self.view = view } - + convenience init(andContain view: UIView) { self.init() addAndContain(view)