Created
March 29, 2019 20:08
-
-
Save FabiolaRamirez/408c21b0c89bac0e54945224d7c918c5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // ScoreIncreaseSimTableViewController.swift | |
| // financeUI | |
| // | |
| // Created by Fabiola Ramirez on 3/29/19. | |
| // Copyright © 2019 creditsesame. All rights reserved. | |
| // | |
| import UIKit | |
| enum Grade: String { | |
| case A = "A" | |
| case B = "B" | |
| case C = "C" | |
| case D = "D" | |
| case F = "F" | |
| static var grades: [Grade] { | |
| return [.F, .D, .C, .B, .A] | |
| } | |
| } | |
| class ScoreIncreaseSimTableViewController: UITableViewController { | |
| let cellIdentifier = "test2Cell" | |
| let expanded = false | |
| override func viewDidLoad() { | |
| super.viewDidLoad() | |
| tableView.register(UITableViewCell.self, forCellReuseIdentifier: cellIdentifier) | |
| tableView.separatorStyle = .none | |
| } | |
| // MARK: - Table view data source | |
| override func numberOfSections(in tableView: UITableView) -> Int { | |
| return 1 | |
| } | |
| override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | |
| return 1 | |
| } | |
| override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | |
| let cell = tableView.dequeueReusableCell(withIdentifier: cellIdentifier, for: indexPath) | |
| cell.selectionStyle = .none | |
| for v in cell.contentView.subviews { | |
| v.removeFromSuperview() | |
| } | |
| let scoreIncreaseSimView = ScoreIncreaseSimulationView() | |
| scoreIncreaseSimView.configureCCScoreIncreaseSim(potentialIncreseNumber: 3, potentialDecreaseNumber: 13, isExpandedCell: expanded, currentCreditUsageGrade: Grade.C, goalCreditUsageGrade: Grade.B, currentCreditAgeGrade: Grade.C, goalCreditAgeGrade: Grade.C, currentCreditInquiryGrade: Grade.C, goalCreditInquiryGrade: Grade.C, percentageScoreUsage: 35, percentageScoreAge: 15, percentageScoreInquiry: 10, currentPotentialCreditUsageValue: 5.627, limitPotentialCreditUsageValue: 9.600, potentialCreditAverageAgeValue: 4.5, potentialTotalCreditInquiriesValue: 6) | |
| cell.contentView.addSubview(scoreIncreaseSimView) | |
| scoreIncreaseSimView.snp.makeConstraints { make in | |
| make.edges.equalToSuperview() | |
| } | |
| return cell | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment