// // SearchAccountView.swift // Wallet // // Created by Alexandr Serpokrylow on 14.02.2022. // Copyright © 2022 AM. All rights reserved. // import UIKit import WalletUIComponents class SearchAccountView: UIView { let searchTextField: CommonTextFieldSearch private enum Constants { static let bottomPadding: CGFloat = 12 } init(viewModel: TextFieldViewModel) { self.searchTextField = CommonTextFieldSearch(viewModel: viewModel) super.init(frame: .zero) let textField = UIHostingView(rootView: self.searchTextField, autoresizingMask: false) self.addSubview(textField) NSLayoutConstraint.activate([ textField.topAnchor.constraint(equalTo: self.topAnchor), textField.leadingAnchor.constraint(equalTo: self.leadingAnchor), textField.trailingAnchor.constraint(equalTo: self.trailingAnchor), textField.bottomAnchor.constraint(equalTo: self.bottomAnchor, constant: -Constants.bottomPadding) ]) } required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } }