SettlementViewController.swift 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. //
  2. // SettlementViewController.swift
  3. // xingchuangke
  4. // 结算信息
  5. // Created by Virgil on 2019/8/12.
  6. // Copyright © 2019 Virgil. All rights reserved.
  7. //
  8. import UIKit
  9. class SettlementViewController: BaseViewController, UITableViewDataSource, UITableViewDelegate {
  10. let arrTitle = ["开通T+0结算"]
  11. @IBOutlet weak var tableView: UITableView!
  12. override func viewDidLoad() {
  13. super.viewDidLoad()
  14. initNavLeftBackButton()
  15. self.title = "结算信息"
  16. tableView.register(UINib(nibName: "SettlementTableViewCell", bundle: nil), forCellReuseIdentifier: "SettlementTableViewCell")
  17. tableView.delegate = self
  18. tableView.dataSource = self
  19. tableView.separatorStyle = .none
  20. tableView.showsVerticalScrollIndicator = false
  21. tableView.estimatedRowHeight = 100
  22. }
  23. // MARK: TABLEVLEW 实现
  24. func numberOfSections(in tableView: UITableView) -> Int {
  25. return 1
  26. }
  27. func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
  28. return self.arrTitle.count
  29. }
  30. func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
  31. return 52
  32. }
  33. func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
  34. let cell = tableView.dequeueReusableCell(withIdentifier: "SettlementTableViewCell", for: indexPath as IndexPath) as! SettlementTableViewCell
  35. cell.lblContent.text = arrTitle[indexPath.row]
  36. return cell
  37. }
  38. func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
  39. let view = BJBusinessViewController()
  40. view.title = arrTitle[indexPath.row]
  41. self.navigationController?.pushViewController(view, animated: true)
  42. }
  43. override func viewWillAppear(_ animated: Bool) {
  44. super.viewWillAppear(animated)
  45. }
  46. override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
  47. super.init(nibName: "SettlementViewController", bundle: nil)
  48. }
  49. required init?(coder aDecoder: NSCoder) {
  50. fatalError("init(coder:) has not been implemented")
  51. }
  52. }