SettingView.swift
1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//
// SettingView.swift
// browser
//
// Created by Artem Talko on 26.09.2023.
//
import UIKit
final class SettingView: GradientView {
let backButton: UIButton = {
let obj = UIButton()
obj.setImage(UIImage(systemName: "arrow.left"), for: .normal)
obj.contentMode = .scaleToFill
return obj
}()
let settingTableView: UITableView = {
let obj = UITableView()
obj.isScrollEnabled = false
obj.separatorStyle = .none
obj.backgroundColor = .clear
return obj
}()
override init(frame: CGRect) {
super.init(frame: frame)
setup()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
private func setup() {
addSubview(settingTableView)
addSubview(backButton)
setupConstraints()
}
private func setupConstraints() {
settingTableView.snp.makeConstraints { make in
make.top.equalToSuperview().offset(168.sizeH)
make.bottom.equalToSuperview().offset(-100.sizeH)
make.leading.trailing.equalToSuperview().inset(32.sizeW)
}
backButton.snp.makeConstraints { make in
make.top.equalTo(safeAreaLayoutGuide.snp.top).offset(16.sizeH)
make.height.equalTo(24.sizeH)
make.leading.equalToSuperview().inset(16.sizeW)
}
}
}