From 5c8f7c904fde7b779328201d60c318f5391571c2 Mon Sep 17 00:00:00 2001 From: EunsuSeo01 Date: Mon, 30 Dec 2024 11:01:07 +0900 Subject: [PATCH] =?UTF-8?q?[Feat]=20#319=20-=20=EC=A3=BC=EC=86=8C=20?= =?UTF-8?q?=EB=8D=B0=EC=9D=B4=ED=84=B0=20=EB=B0=94=EC=9D=B8=EB=94=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Present/HankkiDetail/View/DetailMapView.swift | 7 +++---- .../HankkiDetail/View/HankkiDetailViewController.swift | 6 +++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/DetailMapView.swift b/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/DetailMapView.swift index 606ff31b..28e8d9c4 100644 --- a/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/DetailMapView.swift +++ b/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/DetailMapView.swift @@ -11,7 +11,6 @@ import NMapsMap final class DetailMapView: BaseView { - // MARK: - Properties // MARK: - UI Components private let mapView: NMFMapView = NMFMapView() @@ -104,12 +103,12 @@ final class DetailMapView: BaseView { ) } - // TODO: - 위경도 값으로 주소 불러와야 함 addressLabel.do { $0.attributedText = UILabel.setupAttributedText( for: PretendardStyle.caption4, color: .gray700 ) + $0.numberOfLines = 2 } copyButton.do { @@ -129,8 +128,8 @@ final class DetailMapView: BaseView { extension DetailMapView { - func bindData(latitude: Double, longitude: Double) { - addressLabel.text = "\(latitude) \(longitude)" + func bindData(latitude: Double, longitude: Double, address: String) { + addressLabel.text = address addMapMarker(latitude: latitude, longitude: longitude) moveMapCamera(latitude: latitude, longitude: longitude) } diff --git a/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/HankkiDetailViewController.swift b/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/HankkiDetailViewController.swift index 0f935e20..9be9f4ac 100644 --- a/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/HankkiDetailViewController.swift +++ b/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/HankkiDetailViewController.swift @@ -169,7 +169,11 @@ private extension HankkiDetailViewController { heartCount: String(data.heartCount), isLiked: data.isLiked ) - detailMapView.bindData(latitude: data.latitude, longitude: data.longitude) + detailMapView.bindData( + latitude: data.latitude, + longitude: data.longitude, + address: viewModel.address ?? "-" + ) menuCollectionView.collectionView.reloadData() }