Files
2023-03-02 18:28:42 +03:00

40 lines
1.1 KiB
Swift

//
// 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")
}
}