diff --git a/Hankkijogbo/Hankkijogbo/Network/Hankki/DTO/Response/GetHankkiDetailResponseDTO.swift b/Hankkijogbo/Hankkijogbo/Network/Hankki/DTO/Response/GetHankkiDetailResponseDTO.swift index 5b238c68..87843e3a 100644 --- a/Hankkijogbo/Hankkijogbo/Network/Hankki/DTO/Response/GetHankkiDetailResponseDTO.swift +++ b/Hankkijogbo/Hankkijogbo/Network/Hankki/DTO/Response/GetHankkiDetailResponseDTO.swift @@ -15,6 +15,9 @@ struct GetHankkiDetailResponseData: Codable { let isLiked: Bool let imageUrls: [String] let menus: [MenuData] + let latitude: Double = 37.502802 + let longitude: Double = 127.0841337 + let categoryImageUrl: String = "" } struct MenuData: Codable { diff --git a/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/DetailMapView.swift b/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/DetailMapView.swift index ff6d2745..04942280 100644 --- a/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/DetailMapView.swift +++ b/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/DetailMapView.swift @@ -107,7 +107,6 @@ final class DetailMapView: BaseView { addressLabel.do { $0.attributedText = UILabel.setupAttributedText( for: PretendardStyle.caption4, - withText: "경기도 수원시 아주대학교 어쩌구", color: .gray700 ) } @@ -127,6 +126,13 @@ final class DetailMapView: BaseView { } } +extension DetailMapView { + + func bindData(latitude: Double, longitude: Double) { + addressLabel.text = "\(latitude) \(longitude)" + } +} + // MARK: - Private Func private extension DetailMapView { diff --git a/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/HankkiDetailViewController.swift b/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/HankkiDetailViewController.swift index 0a203ffe..1d1a55ed 100644 --- a/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/HankkiDetailViewController.swift +++ b/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/HankkiDetailViewController.swift @@ -165,11 +165,12 @@ private extension HankkiDetailViewController { hankkiInfoView.bindData( category: data.category, + categoryImageUrl: data.categoryImageUrl, name: data.name, heartCount: String(data.heartCount), isLiked: data.isLiked ) - // map view bind data 예정 + detailMapView.bindData(latitude: data.latitude, longitude: data.longitude) menuCollectionView.updateLayout(menuSize: data.menus.count) menuCollectionView.collectionView.reloadData() diff --git a/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/HankkiInfoView.swift b/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/HankkiInfoView.swift index cc5d4858..e15b8878 100644 --- a/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/HankkiInfoView.swift +++ b/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/HankkiInfoView.swift @@ -71,10 +71,6 @@ final class HankkiInfoView: BaseView { $0.backgroundColor = .hankkiWhite } - categoryImageView.do { - $0.image = .icHomeSelected - } - categoryLabel.do { $0.attributedText = UILabel.setupAttributedText(for: PretendardStyle.caption4, color: .gray900) } @@ -112,8 +108,9 @@ final class HankkiInfoView: BaseView { extension HankkiInfoView { - func bindData(category: String, name: String, heartCount: String, isLiked: Bool) { + func bindData(category: String, categoryImageUrl: String, name: String, heartCount: String, isLiked: Bool) { categoryLabel.text = category + categoryImageView.setKFImage(url: categoryImageUrl) nameLabel.text = name if let attributedTitle = UILabel.setupAttributedText( for: PretendardStyle.body8,