Commit de83d6e8 authored by Steven杜宇's avatar Steven杜宇

// 消息

parent b7b08a63
......@@ -11,7 +11,9 @@ import AttributedString
class YHInformationFillCell: UITableViewCell {
static let cellReuseIdentifier = "YHInformationFillCell"
static let unreadPointWidth = 6.0
var whiteView:UIView!
var titleLabel:UILabel!
var detailLabel:UILabel!
......@@ -31,9 +33,12 @@ class YHInformationFillCell: UITableViewCell {
func setupUI() {
self.selectionStyle = .none
contentView.backgroundColor = .white
contentView.backgroundColor = UIColor(hex:0xF8F8F8)
whiteView = UIView()
whiteView.backgroundColor = .white
whiteView.layer.cornerRadius = 6.0
whiteView.clipsToBounds = true
contentView.addSubview(whiteView)
titleLabel = UILabel()
......@@ -51,14 +56,12 @@ class YHInformationFillCell: UITableViewCell {
detailLabel = UILabel()
detailLabel.textColor = UIColor(hex: 0x222222)
detailLabel.textAlignment = .left
detailLabel.font = UIFont.PFSC_M(ofSize:17)
detailLabel.text = "资料填写提醒".local
detailLabel.numberOfLines = 0
whiteView.addSubview(detailLabel)
lineView = UIView()
lineView.backgroundColor = UIColor(hex: 0x888F98)
lineView.backgroundColor = UIColor(hex:0xF8F8F8)
whiteView.addSubview(lineView)
bottomBtn = UIButton()
......@@ -69,7 +72,9 @@ class YHInformationFillCell: UITableViewCell {
whiteView.addSubview(bottomBtn)
whiteView.snp.makeConstraints { make in
make.edges.equalToSuperview()
make.left.equalToSuperview().offset(16)
make.right.equalToSuperview().offset(-16)
make.top.bottom.equalToSuperview()
}
titleLabel.snp.makeConstraints { make in
......@@ -98,9 +103,12 @@ class YHInformationFillCell: UITableViewCell {
}
bottomBtn.snp.makeConstraints { make in
make.top.equalTo(lineView.snp.bottom)
make.left.right.bottom.equalToSuperview()
make.height.equalTo(52)
}
updateModel()
}
@objc func didBottomBtnClicked() {
......
......@@ -9,11 +9,116 @@
import UIKit
class YHInformationFillVC: YHBaseViewController {
var msgArr:[String] = ["","","",""]
lazy var navBar: YHCustomNavigationBar = {
let bar = YHCustomNavigationBar.navBar()
bar.backgroundColor = .white
bar.title = "资料填写".local
bar.showRightButtonType(.clean)
bar.backBlock = {
[weak self] in
guard let self = self else { return }
self.navigationController?.popViewController(animated: true)
}
bar.rightBtnClick = {
[weak self] in
guard let self = self else { return }
}
return bar
}()
lazy var tableView: UITableView = {
let tableView = UITableView(frame:.zero, style:.grouped)
tableView.sectionHeaderHeight = 46.0
tableView.estimatedSectionFooterHeight = 1.0
tableView.showsVerticalScrollIndicator = false
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.backgroundColor = UIColor(hex:0xF8F8F8)
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "UITableViewCell")
tableView.register(YHInformationFillCell.self, forCellReuseIdentifier: YHInformationFillCell.cellReuseIdentifier)
return tableView
}()
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
}
func setupUI() {
gk_navigationBar.isHidden = true
view.backgroundColor = .white
view.addSubview(tableView)
view.addSubview(navBar)
navBar.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalToSuperview().offset(k_Height_statusBar())
make.height.equalTo(k_Height_NavContentBar)
}
tableView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalToSuperview().offset(k_Height_NavigationtBarAndStatuBar)
make.bottom.equalToSuperview()
}
}
}
// Do any additional setup after loading the view.
extension YHInformationFillVC: UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return msgArr.count
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 1
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: YHInformationFillCell.cellReuseIdentifier, for: indexPath) as! YHInformationFillCell
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return UITableView.automaticDimension
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
}
private func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> CGFloat {
return 46.0
}
private func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> CGFloat {
return 1.0
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let view = UIView()
let label = UILabel()
label.textColor = UIColor(hex: 0x121A26, alpha: 0.3)
label.textAlignment = .center
label.font = UIFont.PFSC_R(ofSize:12)
label.text = "2023-09-13"
view.addSubview(label)
label.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
return view
}
}
......@@ -96,6 +96,8 @@ extension YHMsgViewController: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let vc = YHInformationFillVC()
self.navigationController?.pushViewController(vc)
}
private func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> CGFloat {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment