Merge branch 'feature/container_open' into 'develop'

open

See merge request BPHV_MIPS/mvm_core_ui!733
This commit is contained in:
Pfeil, Scott Robert 2021-07-08 20:18:19 +00:00
commit 1f2d8f27df

View File

@ -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)