diff --git a/Coinone-iOS/Coinone-iOS/Source/Cells/StockTVC.swift b/Coinone-iOS/Coinone-iOS/Source/Cells/StockTVC.swift index 00efd23..fb754e5 100644 --- a/Coinone-iOS/Coinone-iOS/Source/Cells/StockTVC.swift +++ b/Coinone-iOS/Coinone-iOS/Source/Cells/StockTVC.swift @@ -148,7 +148,7 @@ extension StockTVC { } extension StockTVC { - func setData(coinLogoImageName: String, coinEnglishTitle: String, coinKoreanTitle: String, coinCurrentPrice: Float, riseOrDescent: String, percentage: Float, coinTotalPrice: Float) { + func setData(coinLogoImageName: String, coinEnglishTitle: String, coinKoreanTitle: String, coinCurrentPrice: Float, riseOrDescent: String, percentage: Double, coinTotalPrice: Float) { let formatter = NumberFormatter().then { $0.numberStyle = .decimal } diff --git a/Coinone-iOS/Coinone-iOS/Source/Models/StockModel.swift b/Coinone-iOS/Coinone-iOS/Source/Models/StockModel.swift index 7ef5721..c538ef2 100644 --- a/Coinone-iOS/Coinone-iOS/Source/Models/StockModel.swift +++ b/Coinone-iOS/Coinone-iOS/Source/Models/StockModel.swift @@ -10,7 +10,8 @@ struct StockModel { var logoImage: String! var title: String! var subTitle: String! - var curValue: String! - var rate: String! - var transPrice: Int! + var curValue: Float! + var riseOrDescent: String + var rate: Double! + var transPrice: Float! } diff --git a/Coinone-iOS/Coinone-iOS/Source/ViewControllers/GeoraesoVC.swift b/Coinone-iOS/Coinone-iOS/Source/ViewControllers/GeoraesoVC.swift index c9bcf62..7dc5d1a 100644 --- a/Coinone-iOS/Coinone-iOS/Source/ViewControllers/GeoraesoVC.swift +++ b/Coinone-iOS/Coinone-iOS/Source/ViewControllers/GeoraesoVC.swift @@ -237,6 +237,7 @@ class GeoraesoVC: UIViewController { tableView.backgroundColor = .tableViewGray tableView.tableFooterView = UIView(frame: .zero) + tableView.separatorStyle = .none tableView.register(StockTVC.self, forCellReuseIdentifier: StockTVC.identifier) @@ -305,23 +306,26 @@ class GeoraesoVC: UIViewController { // MARK: - DummyData func setDummyData() { stockList.append(contentsOf: [ - StockModel(logoImage: "", + StockModel(logoImage: "coinLogo", title: "XRP", subTitle: "리플", - curValue: "1,625", - rate: "-0.37%", + curValue: 1625, + riseOrDescent: "-", + rate: 0.37, transPrice: 2059), - StockModel(logoImage: "", + StockModel(logoImage: "coinLogo", title: "XRP", subTitle: "리플", - curValue: "1,500", - rate: "-0.37%", + curValue: 1625, + riseOrDescent: "-", + rate: 0.37, transPrice: 2489), - StockModel(logoImage: "", + StockModel(logoImage: "coinLogo", title: "XRP", subTitle: "리플", - curValue: "1,000", - rate: "-0.37%", + curValue: 1625, + riseOrDescent: "-", + rate: 0.37, transPrice: 1280)]) } } @@ -446,7 +450,7 @@ extension GeoraesoVC: UITableViewDataSource { cell.contentView.backgroundColor = .tableViewGray let data = stockList[indexPath.row] - cell.setData(logoPath: data.title, title: data.title, subTitle: data.subTitle, curValue: data.curValue, rate: data.rate, transPrice: data.transPrice) + cell.setData(coinLogoImageName: data.logoImage, coinEnglishTitle: data.title, coinKoreanTitle: data.subTitle, coinCurrentPrice: data.curValue, riseOrDescent: data.riseOrDescent, percentage: data.rate, coinTotalPrice: data.transPrice) return cell } }