ReportVC.swift 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. //
  2. // ReportVC.swift
  3. // MahaSombathLottoPro
  4. //
  5. // Created by Visoth Phon on 2/1/21.
  6. //
  7. import UIKit
  8. class ReportVC: UIViewController, UITableViewDataSource, UITableViewDelegate {
  9. @IBOutlet weak var vcBetResult: UIView!
  10. @IBOutlet weak var vcWinResult: UIView!
  11. @IBOutlet weak var vcReportResult: UIView!
  12. @IBOutlet weak var tbResult: UITableView!
  13. override func viewWillAppear(_ animated: Bool) {
  14. super.viewWillAppear(animated)
  15. setNeedsStatusBarAppearanceUpdate()
  16. }
  17. override var preferredStatusBarStyle: UIStatusBarStyle {
  18. .lightContent
  19. }
  20. override func viewDidLoad() {
  21. super.viewDidLoad()
  22. Utility.roundCornerView(view: vcBetResult, borderColor: UIColor.white, borderSize: 10.0)
  23. Utility.roundCornerView(view: vcWinResult, borderColor: UIColor.white, borderSize: 10.0)
  24. Utility.roundCornerView(view: vcReportResult, borderColor: UIColor.white, borderSize: 10.0)
  25. }
  26. @IBAction func actionBtnWin_WinVC(_ sender: Any) {
  27. self.showView(isHiddenWinView: false, isHiddenBetView: true, isHiddenReportView: true)
  28. }
  29. @IBAction func actionBtnWin_ResultVC(_ sender: Any) {
  30. self.showView(isHiddenWinView: false, isHiddenBetView: true, isHiddenReportView: true)
  31. }
  32. @IBAction func actionBtnWin_ReportVC(_ sender: Any) {
  33. self.showView(isHiddenWinView: false, isHiddenBetView: true, isHiddenReportView: true)
  34. }
  35. @IBAction func actionBtnBetView_WinVC(_ sender: Any) {
  36. self.showView(isHiddenWinView: true, isHiddenBetView: false, isHiddenReportView: true)
  37. }
  38. @IBAction func actionBtnBet_ResultVC(_ sender: Any) {
  39. self.showView(isHiddenWinView: true, isHiddenBetView: false, isHiddenReportView: true)
  40. }
  41. @IBAction func actionBtnResult_ReportVC(_ sender: Any) {
  42. self.showView(isHiddenWinView: true, isHiddenBetView: false, isHiddenReportView: true)
  43. }
  44. @IBAction func actionBtnReport_WinVC(_ sender: Any) {
  45. self.showView(isHiddenWinView: true, isHiddenBetView: true, isHiddenReportView: false)
  46. }
  47. @IBAction func actionBtnReport_ResultVC(_ sender: Any) {
  48. self.showView(isHiddenWinView: true, isHiddenBetView: true, isHiddenReportView: false)
  49. }
  50. @IBAction func actionBtnReport_ReportVC(_ sender: Any) {
  51. self.showView(isHiddenWinView: true, isHiddenBetView: true, isHiddenReportView: false)
  52. }
  53. @IBAction func actionCloseView(_ sender: Any) {
  54. self.dismiss(animated: true, completion: nil)
  55. }
  56. func showView(isHiddenWinView: Bool,
  57. isHiddenBetView: Bool,
  58. isHiddenReportView: Bool) {
  59. self.vcWinResult.isHidden = isHiddenWinView
  60. self.vcBetResult.isHidden = isHiddenBetView
  61. self.vcReportResult.isHidden = isHiddenReportView
  62. }
  63. func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
  64. let cell = tableView.dequeueReusableCell(withIdentifier: "WinResultCell", for: indexPath) as! WinResultCell
  65. return cell
  66. }
  67. func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
  68. return 5
  69. }
  70. func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
  71. return 40;
  72. }
  73. func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
  74. return 0
  75. }
  76. func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
  77. return nil;
  78. }
  79. }