//
|
// NoticeCenterVC.swift
|
// XQMuse
|
//
|
// Created by 无故事王国 on 2024/8/20.
|
//
|
|
import UIKit
|
|
class NoticeCenterVC: BaseVC {
|
|
private var tableView:UITableView!
|
|
override func viewDidLoad() {
|
super.viewDidLoad()
|
title = "消息通知"
|
|
}
|
|
override func setUI() {
|
super.setUI()
|
view.backgroundColor = UIColor(hexString: "#fafafa")
|
|
tableView = UITableView(frame: .zero, style: .plain)
|
tableView.delegate = self
|
tableView.dataSource = self
|
tableView.backgroundColor = .clear
|
tableView.separatorStyle = .none
|
tableView.register(UINib(nibName: "MessageTCell", bundle: nil), forCellReuseIdentifier: "_MessageTCell")
|
view.addSubview(tableView)
|
tableView.snp.makeConstraints { make in
|
make.left.right.bottom.equalToSuperview()
|
make.top.equalTo(self.view.safeAreaLayoutGuide.snp.top).offset(9)
|
}
|
}
|
}
|
|
extension NoticeCenterVC:UITableViewDelegate & UITableViewDataSource{
|
|
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
if indexPath.row == 0{
|
let vc = NoticeCenterSysDetailVC()
|
push(vc: vc)
|
}
|
|
if indexPath.row == 1{
|
let vc = NoticeCenterUserRepeaceDetailVC()
|
push(vc: vc)
|
}
|
}
|
|
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
let cell = tableView.dequeueReusableCell(withIdentifier: "_MessageTCell", for: indexPath) as! MessageTCell
|
cell.backgroundColor = .clear
|
return cell
|
}
|
|
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
|
94.5
|
}
|
|
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
return 10
|
}
|
|
|
}
|