1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- //
- // MessageDetailesView.swift
- // RainbowPlanet
- //
- // Created by 南鑫林 on 2019/4/25.
- // Copyright © 2019 南鑫林. All rights reserved.
- //
- import UIKit
- class MessageDetailesView: BaseView {
-
- override func setupViews() {
- addSubview(tableView)
- }
-
- override func setupLayouts() {
- tableView.snp.makeConstraints { (make) in
- make.edges.equalToSuperview()
- }
- }
-
- private lazy var tableView: UITableView = {
- let tableView = UITableView(frame: CGRect.zero, style: UITableView.Style.grouped)
- tableView.backgroundColor = kf7f8faColor
- tableView.delegate = self
- tableView.dataSource = self
- tableView.estimatedRowHeight = 102
- tableView.rowHeight = UITableView.automaticDimension
- tableView.separatorStyle = .none
- return tableView
- }()
- }
- extension MessageDetailesView: UITableViewDelegate,UITableViewDataSource {
-
- func numberOfSections(in tableView: UITableView) -> Int {
- return 5
- }
-
- func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
- return 1
- }
-
- func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
- let cell = MessageDetailesTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
- return cell
- }
-
- func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
- let headerView = MessageDetailesTimeView(frame: CGRect(x: 0, y: 0, width: kScreenWidth, height: 55))
- return headerView
- }
-
-
- func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
- return 55
- }
-
- func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
- return nil
- }
-
- func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
- return 0.0000001
- }
-
- }
|