-
-
Notifications
You must be signed in to change notification settings - Fork 487
/
Copy pathMutableTextCell.swift
34 lines (28 loc) · 1016 Bytes
/
MutableTextCell.swift
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
//
// DeviceTokenCell.swift
// Bark
//
// Created by huangfeng on 2022/3/23.
// Copyright © 2022 Fin. All rights reserved.
//
import UIKit
class MutableTextCell: BaseTableViewCell<MutableTextCellViewModel> {
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: UITableViewCell.CellStyle.value1, reuseIdentifier: reuseIdentifier)
self.selectionStyle = .none
self.accessoryType = .none
self.backgroundColor = BKColor.background.secondary
self.detailTextLabel?.textColor = BKColor.grey.darken2
}
@available(*, unavailable)
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override func bindViewModel(model: MutableTextCellViewModel) {
super.bindViewModel(model: model)
self.textLabel?.text = model.title
model.text
.drive(self.detailTextLabel!.rx.text)
.disposed(by: rx.reuseBag)
}
}