From fbdb1604366f644d17b803bd832309171287591d Mon Sep 17 00:00:00 2001 From: OHCHANGMIN Date: Thu, 2 Dec 2021 14:45:50 +0900 Subject: [PATCH] =?UTF-8?q?[Refactor]=20#381=20=EA=B8=B0=EB=A1=9D=EC=A0=95?= =?UTF-8?q?=EB=B3=B4=20-=EB=A1=9C=20=ED=99=94=EB=A9=B4=20=ED=91=9C?= =?UTF-8?q?=EC=8B=9C=EC=9D=BC=20=EB=95=8C=20VoiceOver=20=EC=97=86=EC=9D=8C?= =?UTF-8?q?=20=EC=9C=BC=EB=A1=9C=20=EC=8B=A4=ED=96=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Scenes/ResultDetailScene/DetailCell.swift | 3 ++- .../ResultDetailSmallerInfoView.swift | 15 ++++++--------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/SanTa/SanTa/Scenes/ResultDetailScene/DetailCell.swift b/SanTa/SanTa/Scenes/ResultDetailScene/DetailCell.swift index d7a73a4..ce3a1e6 100644 --- a/SanTa/SanTa/Scenes/ResultDetailScene/DetailCell.swift +++ b/SanTa/SanTa/Scenes/ResultDetailScene/DetailCell.swift @@ -101,11 +101,12 @@ extension DetailCell { var label = "\(title)정보. " self.stack.arrangedSubviews.forEach { let stackView = $0 as? UIStackView - guard let contentLabel = (stackView?.arrangedSubviews[0] as? UILabel)?.text, + guard var contentLabel = (stackView?.arrangedSubviews[0] as? UILabel)?.text, let contentTitleLabel = (stackView?.arrangedSubviews[1] as? UILabel)?.text else { return } + contentLabel = contentLabel == "-" ? "없음" : contentLabel label += "\(contentTitleLabel): \(contentLabel), " } self.accessibilityLabel = label diff --git a/SanTa/SanTa/Scenes/ResultDetailScene/ResultDetailSmallerInfoView.swift b/SanTa/SanTa/Scenes/ResultDetailScene/ResultDetailSmallerInfoView.swift index c927af7..3bc3d15 100644 --- a/SanTa/SanTa/Scenes/ResultDetailScene/ResultDetailSmallerInfoView.swift +++ b/SanTa/SanTa/Scenes/ResultDetailScene/ResultDetailSmallerInfoView.swift @@ -81,7 +81,6 @@ final class ResultDetailSmallerInfoView: UIView { stackView.axis = .vertical stackView.alignment = .center stackView.spacing = 5 -// stackView.distribution = .fillEqually return stackView }() @@ -90,7 +89,6 @@ final class ResultDetailSmallerInfoView: UIView { stackView.axis = .vertical stackView.alignment = .center stackView.spacing = 5 -// stackView.distribution = .fillEqually return stackView }() @@ -99,7 +97,6 @@ final class ResultDetailSmallerInfoView: UIView { stackView.axis = .vertical stackView.alignment = .center stackView.spacing = 5 -// stackView.distribution = .fillEqually return stackView }() @@ -108,7 +105,6 @@ final class ResultDetailSmallerInfoView: UIView { stackView.axis = .vertical stackView.alignment = .center stackView.spacing = 5 -// stackView.distribution = .fillEqually return stackView }() @@ -117,7 +113,6 @@ final class ResultDetailSmallerInfoView: UIView { stackView.axis = .vertical stackView.alignment = .center stackView.spacing = 5 -// stackView.distribution = .fillEqually return stackView }() @@ -126,7 +121,6 @@ final class ResultDetailSmallerInfoView: UIView { stackView.axis = .vertical stackView.alignment = .center stackView.spacing = 5 -// stackView.distribution = .fillEqually return stackView }() @@ -198,12 +192,15 @@ extension ResultDetailSmallerInfoView { guard let distance = self.distance.text, let time = self.time.text, let steps = self.steps.text, - let maxAltitude = self.maxAltitude.text, - let minAltitude = self.minAltitude.text, - let averageSpeed = self.averageSpeed.text + var maxAltitude = self.maxAltitude.text, + var minAltitude = self.minAltitude.text, + var averageSpeed = self.averageSpeed.text else { return } + maxAltitude = maxAltitude == "-" ? " 없음" : maxAltitude + minAltitude = minAltitude == "-" ? " 없음" : minAltitude + averageSpeed = averageSpeed == "-" ? " 없음" : averageSpeed self.accessibilityLabel = "기록 정보 거리: \(distance)km, 시간: \(time), 걸음: \(steps), 최고고도: \(maxAltitude), 최저고도: \(minAltitude), 평균속도: \(averageSpeed)" }