-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathBitnagilBaseTableViewCell.swift
More file actions
44 lines (35 loc) · 1.06 KB
/
BitnagilBaseTableViewCell.swift
File metadata and controls
44 lines (35 loc) · 1.06 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
//
// MyPageTableViewCell.swift
// Presentation
//
// Created by 이동현 on 7/17/25.
//
import SnapKit
import UIKit
class BitnagilBaseTableViewCell: UITableViewCell {
private enum Layout {
static let titleLableLeadingSpacing: CGFloat = 20
}
private let titleLabel = UILabel()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
configureAttribute()
configureLayout()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func configure(title: String) {
titleLabel.text = title
}
func configureAttribute() {
titleLabel.font = BitnagilFont(style: .body1, weight: .regular).font
}
func configureLayout() {
contentView.addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in
make.verticalEdges.equalToSuperview()
make.leading.equalToSuperview().offset(Layout.titleLableLeadingSpacing)
}
}
}