mirror of
https://github.com/luxfi/safe-ios.git
synced 2026-10-30 15:19:20 +00:00
36 lines
1007 B
Swift
36 lines
1007 B
Swift
//
|
|
// ContainerTableViewCell.swift
|
|
// Multisig
|
|
//
|
|
// Created by Dmitry Bespalov on 12.01.22.
|
|
// Copyright © 2022 Gnosis Ltd. All rights reserved.
|
|
//
|
|
|
|
import UIKit
|
|
|
|
class ContainerTableViewCell: UITableViewCell {
|
|
|
|
@IBOutlet weak var cellContentView: UIView!
|
|
|
|
func setContent(_ view: UIView?) {
|
|
for view in cellContentView.subviews {
|
|
view.removeFromSuperview()
|
|
}
|
|
if let view = view {
|
|
view.translatesAutoresizingMaskIntoConstraints = false
|
|
cellContentView.addSubview(view)
|
|
|
|
cellContentView.addConstraints([
|
|
cellContentView.topAnchor.constraint(equalTo: view.topAnchor),
|
|
cellContentView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
|
|
cellContentView.heightAnchor.constraint(equalTo: view.heightAnchor),
|
|
cellContentView.widthAnchor.constraint(equalTo: view.widthAnchor)
|
|
])
|
|
|
|
self.setNeedsUpdateConstraints()
|
|
}
|
|
}
|
|
|
|
}
|