diff --git a/Coinone-iOS/Coinone-iOS/Resource/Info.plist b/Coinone-iOS/Coinone-iOS/Resource/Info.plist index d951091..f5f3b74 100644 --- a/Coinone-iOS/Coinone-iOS/Resource/Info.plist +++ b/Coinone-iOS/Coinone-iOS/Resource/Info.plist @@ -2,11 +2,6 @@ - NSAppTransportSecurity - - NSAllowsArbitraryLoads - - CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleExecutable @@ -25,6 +20,11 @@ 1 LSRequiresIPhoneOS + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + UIAppFonts NotoSansKR-Black.otf @@ -48,7 +48,7 @@ UISceneDelegateClassName $(PRODUCT_MODULE_NAME).SceneDelegate UISceneStoryboardFile - Main + Georaeso @@ -58,7 +58,7 @@ UILaunchStoryboardName LaunchScreen UIMainStoryboardFile - Main + Georaeso UIRequiredDeviceCapabilities armv7 diff --git a/Coinone-iOS/Coinone-iOS/Resource/Storyboards/Base.lproj/Main.storyboard b/Coinone-iOS/Coinone-iOS/Resource/Storyboards/Base.lproj/Main.storyboard index 6f3c60d..5784d8b 100644 --- a/Coinone-iOS/Coinone-iOS/Resource/Storyboards/Base.lproj/Main.storyboard +++ b/Coinone-iOS/Coinone-iOS/Resource/Storyboards/Base.lproj/Main.storyboard @@ -1,10 +1,8 @@ - - - + - + diff --git a/Coinone-iOS/Coinone-iOS/Source/Cells/StockTVC.swift b/Coinone-iOS/Coinone-iOS/Source/Cells/StockTVC.swift index 3a7bb5e..00efd23 100644 --- a/Coinone-iOS/Coinone-iOS/Source/Cells/StockTVC.swift +++ b/Coinone-iOS/Coinone-iOS/Source/Cells/StockTVC.swift @@ -106,7 +106,7 @@ extension StockTVC { backView.snp.makeConstraints { make in make.width.equalTo(335) make.height.equalTo(60) - make.top.equalTo(contentView).inset(12) + make.top.equalTo(contentView).inset(6) make.leading.trailing.equalTo(contentView).inset(20) } @@ -148,11 +148,26 @@ extension StockTVC { } extension StockTVC { - func setData(logoPath: String, title: String, subTitle: String, curValue: String, rate: String, transPrice: Int) { - titleLabel.text = title - subTitleLabel.text = subTitle - curValueLabel.text = curValue - rateLabel.text = rate - transPriceLabel.text = "\(transPrice)억" + func setData(coinLogoImageName: String, coinEnglishTitle: String, coinKoreanTitle: String, coinCurrentPrice: Float, riseOrDescent: String, percentage: Float, coinTotalPrice: Float) { + let formatter = NumberFormatter().then { + $0.numberStyle = .decimal + } + + self.logoImage.image = UIImage(named: coinLogoImageName) + self.titleLabel.text = coinEnglishTitle + self.subTitleLabel.text = coinKoreanTitle + + + if riseOrDescent == "+" { + self.curValueLabel.setLabel(text: "\(formatter.string(from: NSNumber(value: coinCurrentPrice))!)", textColor: .textRed, font: .boldSystemFont(ofSize: 14)) + self.rateLabel.setLabel(text: "\(riseOrDescent)\(percentage)%", textColor: .textRed, font: .systemFont(ofSize: 14, weight: .regular)) + } else { + self.curValueLabel.setLabel(text: "\(formatter.string(from: NSNumber(value: coinCurrentPrice))!)", textColor: .mainBlue, font: .boldSystemFont(ofSize: 14)) + self.rateLabel.setLabel(text: "\(riseOrDescent)\(percentage)%", textColor: .mainBlue, font: .systemFont(ofSize: 14, weight: .regular)) + } + + self.transPriceLabel.setLabel(text: "\(formatter.string(from: NSNumber(value:coinTotalPrice))!)억", textColor: .coinGray, font: .systemFont(ofSize: 14, weight: .regular)) + } } +