From b18c5b3ab9ab6f2db8aa77a81490697d53bb3c46 Mon Sep 17 00:00:00 2001 From: L-j-h-c Date: Thu, 6 Oct 2022 22:08:54 +0900 Subject: [PATCH 1/5] =?UTF-8?q?[Fix]=20#317=20-=20=EC=B6=95=EC=B2=99=20?= =?UTF-8?q?=EB=B0=8F=20=EC=8B=9C=EC=9E=91=EC=A7=80=EC=A0=90=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Global/Literals/LocationLiterals.swift | 1 + .../Map/MainMapScene/VC/MainMapVC.swift | 14 ++++++++++---- .../Map/MainMapScene/Views/mapContainerView.swift | 2 +- .../SupplementMapScene/VC/SupplementMapVC.swift | 12 ++++++------ .../Search/SearchScene/VC/SearchResultVC.swift | 4 ++-- .../Search/SearchScene/VC/SearchVC.swift | 4 ++-- 6 files changed, 22 insertions(+), 15 deletions(-) diff --git a/HealthFoodMe/HealthFoodMe/Global/Literals/LocationLiterals.swift b/HealthFoodMe/HealthFoodMe/Global/Literals/LocationLiterals.swift index 1157c495..e28d9415 100644 --- a/HealthFoodMe/HealthFoodMe/Global/Literals/LocationLiterals.swift +++ b/HealthFoodMe/HealthFoodMe/Global/Literals/LocationLiterals.swift @@ -14,6 +14,7 @@ struct MapLiterals { extension MapLiterals { struct Location { static let gangnamStation: NMGLatLng = NMGLatLng(lat: 37.497952, lng: 127.027619) + static let eonjuStation: NMGLatLng = NMGLatLng(lat: 37.5073, lng: 127.0339) } struct ZoomScale { diff --git a/HealthFoodMe/HealthFoodMe/Presentation/Map/MainMapScene/VC/MainMapVC.swift b/HealthFoodMe/HealthFoodMe/Presentation/Map/MainMapScene/VC/MainMapVC.swift index 726a80a2..f641b5c1 100644 --- a/HealthFoodMe/HealthFoodMe/Presentation/Map/MainMapScene/VC/MainMapVC.swift +++ b/HealthFoodMe/HealthFoodMe/Presentation/Map/MainMapScene/VC/MainMapVC.swift @@ -425,14 +425,18 @@ extension MainMapVC { private func setIntitialMapPoint() { if !initialMapOpened { initialMapOpened = true - let NMGPosition = self.locationManager?.currentLatLng() - if NMGPosition != nil { - self.mapView.moveCameraPositionWithZoom(MapLiterals.Location.gangnamStation, Int(MapLiterals.ZoomScale.KM1_5)) - } + self.setInitialMapPointAfterAuth() isInitialPoint = true } } + private func setInitialMapPointAfterAuth() { + let NMGPosition = self.locationManager?.currentLatLng() + if NMGPosition != nil { + self.mapView.moveCameraPositionWithZoom(MapLiterals.Location.eonjuStation, Int(MapLiterals.ZoomScale.KM1)) + } + } + private func setMapView() { locationManager?.add(self) } @@ -849,6 +853,7 @@ extension MainMapVC: CLLocationManagerDelegate { self.mapView.naverMapView.mapView.positionMode = .normal self.canUseLocation = true self.fetchRestaurantList(zoom: MapLiterals.ZoomScale.Maximum) + self.setInitialMapPointAfterAuth() } case .authorizedWhenInUse: locationManager.startUpdatingLocation() @@ -856,6 +861,7 @@ extension MainMapVC: CLLocationManagerDelegate { self.mapView.naverMapView.mapView.positionMode = .normal self.canUseLocation = true self.fetchRestaurantList(zoom: MapLiterals.ZoomScale.Maximum) + self.setInitialMapPointAfterAuth() } @unknown default: break diff --git a/HealthFoodMe/HealthFoodMe/Presentation/Map/MainMapScene/Views/mapContainerView.swift b/HealthFoodMe/HealthFoodMe/Presentation/Map/MainMapScene/Views/mapContainerView.swift index b1234de0..3863a93d 100644 --- a/HealthFoodMe/HealthFoodMe/Presentation/Map/MainMapScene/Views/mapContainerView.swift +++ b/HealthFoodMe/HealthFoodMe/Presentation/Map/MainMapScene/Views/mapContainerView.swift @@ -50,7 +50,7 @@ extension NaverMapContainerView { naverMapView = NMFNaverMapView(frame: self.frame) naverMapView.mapView.positionMode = .direction naverMapView.mapView.locationOverlay.hidden = true - naverMapView.mapView.moveCamera(NMFCameraUpdate(position: NMFCameraPosition(MapLiterals.Location.gangnamStation, zoom: 10.5))) + naverMapView.mapView.moveCamera(NMFCameraUpdate(position: NMFCameraPosition(MapLiterals.Location.eonjuStation, zoom: 10.5))) naverMapView.showZoomControls = false addSubview(naverMapView) diff --git a/HealthFoodMe/HealthFoodMe/Presentation/Map/SupplementMapScene/VC/SupplementMapVC.swift b/HealthFoodMe/HealthFoodMe/Presentation/Map/SupplementMapScene/VC/SupplementMapVC.swift index 545ae326..cded59ff 100644 --- a/HealthFoodMe/HealthFoodMe/Presentation/Map/SupplementMapScene/VC/SupplementMapVC.swift +++ b/HealthFoodMe/HealthFoodMe/Presentation/Map/SupplementMapScene/VC/SupplementMapVC.swift @@ -162,7 +162,7 @@ extension SupplementMapVC { if let id = initialId { self.setInitialPointForSearchVC(id: id, needShowSummary: needShowSummary) } else { - self.mapView.moveCameraPositionWithZoom(MapLiterals.Location.gangnamStation, 200) + self.mapView.moveCameraPositionWithZoom(MapLiterals.Location.eonjuStation, 200) } case .scrap: if let initial = self.initialPoint { @@ -175,7 +175,7 @@ extension SupplementMapVC { } } } else { - self.mapView.moveCameraPositionWithZoom(MapLiterals.Location.gangnamStation, 200) + self.mapView.moveCameraPositionWithZoom(MapLiterals.Location.eonjuStation, 200) } } } @@ -322,7 +322,7 @@ extension SupplementMapVC { self.currentLocation = Location(latitude: position.latitude, longitude: position.longtitude) self.currentSelectedPosition = position } else { - self.setCurrentPositionToGangnam() + self.setCurrentPositionToEonju() } if needShowSummary { @@ -359,9 +359,9 @@ extension SupplementMapVC { } } - private func setCurrentPositionToGangnam() { - self.mapView.moveCameraPositionWithZoom(MapLiterals.Location.gangnamStation, 200) - self.currentLocation = Location(latitude: MapLiterals.Location.gangnamStation.lat, longitude: MapLiterals.Location.gangnamStation.lng) + private func setCurrentPositionToEonju() { + self.mapView.moveCameraPositionWithZoom(MapLiterals.Location.eonjuStation, 200) + self.currentLocation = Location(latitude: MapLiterals.Location.eonjuStation.lat, longitude: MapLiterals.Location.eonjuStation.lng) } private func bindSetSelectPointForSearchVC(dataModel: MapPointDataModel) { diff --git a/HealthFoodMe/HealthFoodMe/Presentation/Search/SearchScene/VC/SearchResultVC.swift b/HealthFoodMe/HealthFoodMe/Presentation/Search/SearchScene/VC/SearchResultVC.swift index 8f98ba9a..e8da6e2d 100644 --- a/HealthFoodMe/HealthFoodMe/Presentation/Search/SearchScene/VC/SearchResultVC.swift +++ b/HealthFoodMe/HealthFoodMe/Presentation/Search/SearchScene/VC/SearchResultVC.swift @@ -191,8 +191,8 @@ extension SearchResultVC { lng = position.lng lat = position.lat } else { - lng = MapLiterals.Location.gangnamStation.lng - lat = MapLiterals.Location.gangnamStation.lat + lng = MapLiterals.Location.eonjuStation.lng + lat = MapLiterals.Location.eonjuStation.lat } if let text = searchTextField.text { searchContent = text diff --git a/HealthFoodMe/HealthFoodMe/Presentation/Search/SearchScene/VC/SearchVC.swift b/HealthFoodMe/HealthFoodMe/Presentation/Search/SearchScene/VC/SearchVC.swift index 34d918b0..3cee2a2d 100644 --- a/HealthFoodMe/HealthFoodMe/Presentation/Search/SearchScene/VC/SearchVC.swift +++ b/HealthFoodMe/HealthFoodMe/Presentation/Search/SearchScene/VC/SearchVC.swift @@ -223,8 +223,8 @@ extension SearchVC { lng = position.lng lat = position.lat } else { - lng = MapLiterals.Location.gangnamStation.lng - lat = MapLiterals.Location.gangnamStation.lat + lng = MapLiterals.Location.eonjuStation.lng + lat = MapLiterals.Location.eonjuStation.lat } if let text = searchTextField.text { searchContent = text From bc9b400da0de466dbf2a3cd172ebaae6f7ba73bb Mon Sep 17 00:00:00 2001 From: L-j-h-c Date: Thu, 6 Oct 2022 22:19:00 +0900 Subject: [PATCH 2/5] =?UTF-8?q?[Fix]=20#317=20-=20=EB=A9=94=EB=89=B4=20?= =?UTF-8?q?=EC=B9=BC=EB=A1=9C=EB=A6=AC=20=EC=A0=95=EB=B3=B4=20=EC=97=86?= =?UTF-8?q?=EB=8A=94=20=EA=B2=BD=EC=9A=B0=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Presentation/Detail/MenuTabScene/Cells/MenuCellCVC.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/HealthFoodMe/HealthFoodMe/Presentation/Detail/MenuTabScene/Cells/MenuCellCVC.swift b/HealthFoodMe/HealthFoodMe/Presentation/Detail/MenuTabScene/Cells/MenuCellCVC.swift index 08fd02d8..ee7b48cf 100644 --- a/HealthFoodMe/HealthFoodMe/Presentation/Detail/MenuTabScene/Cells/MenuCellCVC.swift +++ b/HealthFoodMe/HealthFoodMe/Presentation/Detail/MenuTabScene/Cells/MenuCellCVC.swift @@ -70,9 +70,10 @@ extension MenuCellCVC { menuView.pickImageView.image = menuData.isPick ? UIImage(named: "icn_pick") : .none menuView.priceLabel.text = "\(menuData.menuPrice)원" - if menuData.menuKcal == 0 { + if menuData.menuKcal == -1 { menuView.kcalView.isHidden = true } else { + menuView.kcalView.isHidden = false guard let menuKcal = menuData.menuKcal else { return } let intKcal = Int(menuKcal) menuView.kcalLabel.text = "\(intKcal)" From 34a729514fb559e31dbc8c4bbdb8d606d02256cb Mon Sep 17 00:00:00 2001 From: L-j-h-c Date: Thu, 6 Oct 2022 22:38:11 +0900 Subject: [PATCH 3/5] =?UTF-8?q?[Feat]=20#317=20-=20=EB=A9=94=EB=89=B4?= =?UTF-8?q?=ED=8C=90=20=EB=8D=B0=EC=9D=B4=ED=84=B0=20=EC=A0=95=EB=A0=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Detail/MenuTabScene/VC/MenuTabVC.swift | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/HealthFoodMe/HealthFoodMe/Presentation/Detail/MenuTabScene/VC/MenuTabVC.swift b/HealthFoodMe/HealthFoodMe/Presentation/Detail/MenuTabScene/VC/MenuTabVC.swift index 7eff8001..4e112771 100644 --- a/HealthFoodMe/HealthFoodMe/Presentation/Detail/MenuTabScene/VC/MenuTabVC.swift +++ b/HealthFoodMe/HealthFoodMe/Presentation/Detail/MenuTabScene/VC/MenuTabVC.swift @@ -139,13 +139,18 @@ extension MenuTabVC { var notPickModel: [MenuDataModel] = [] models.forEach { data in - if data.isPick { + if data.isPick && data.menuKcal != -1 { pickModel.append(data) - } else { + } else if data.isPick { + pickModel.insert(data, at: 0) + } else if data.menuKcal != -1 { notPickModel.append(data) + } else { + notPickModel.insert(data, at: 0) } } - pickModel += notPickModel + pickModel = pickModel.reversed() + pickModel += notPickModel.reversed() self.menuData = pickModel self.menuBoard = restaurantMenuBoard From 12a480b23c84c6ea09c23d6cbe44d45c5f997540 Mon Sep 17 00:00:00 2001 From: L-j-h-c Date: Fri, 7 Oct 2022 00:24:58 +0900 Subject: [PATCH 4/5] =?UTF-8?q?[Feat]=20#317=20-=20=ED=81=B4=EB=9F=AC?= =?UTF-8?q?=EC=8A=A4=ED=84=B0=EB=A7=81=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Map/MainMapScene/Views/mapContainerView.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/HealthFoodMe/HealthFoodMe/Presentation/Map/MainMapScene/Views/mapContainerView.swift b/HealthFoodMe/HealthFoodMe/Presentation/Map/MainMapScene/Views/mapContainerView.swift index 3863a93d..3b0e91e7 100644 --- a/HealthFoodMe/HealthFoodMe/Presentation/Map/MainMapScene/Views/mapContainerView.swift +++ b/HealthFoodMe/HealthFoodMe/Presentation/Map/MainMapScene/Views/mapContainerView.swift @@ -236,11 +236,12 @@ extension NaverMapContainerView { marker.captionText = caption marker.captionHaloColor = .helfmeWhite marker.isForceShowCaption = false + marker.isForceShowIcon = false marker.captionTextSize = 12 marker.captionMinZoom = 12 marker.captionColor = .helfmeBlack } - marker.isHideCollidedMarkers = false + marker.isHideCollidedMarkers = true marker.isHideCollidedCaptions = true marker.isHideCollidedSymbols = true self.markers.append(marker) @@ -263,6 +264,7 @@ extension NaverMapContainerView { if let seletedMark = self.selectedMarker, let type = selectedMarkerType?.type { seletedMark.isForceShowCaption = false + seletedMark.isForceShowIcon = false seletedMark.zIndex = 0 switch type { case .healthFood: @@ -280,6 +282,7 @@ extension NaverMapContainerView { self.selectedMarker = marker self.selectedMarker?.zIndex = 100 self.selectedMarker?.isForceShowCaption = true + self.selectedMarker?.isForceShowIcon = true self.selectedMarkerType = selectedPoint } From 4f8dc42e8e3bd6e5fbe0a6f529613397c1db4578 Mon Sep 17 00:00:00 2001 From: L-j-h-c Date: Fri, 7 Oct 2022 07:15:14 +0900 Subject: [PATCH 5/5] =?UTF-8?q?[Chore]=20#317=20-=20=EB=B9=8C=EB=93=9C=20?= =?UTF-8?q?=EB=B2=84=EC=A0=84=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HealthFoodMe/HealthFoodMe.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/HealthFoodMe/HealthFoodMe.xcodeproj/project.pbxproj b/HealthFoodMe/HealthFoodMe.xcodeproj/project.pbxproj index 98082e15..cb8dc94d 100644 --- a/HealthFoodMe/HealthFoodMe.xcodeproj/project.pbxproj +++ b/HealthFoodMe/HealthFoodMe.xcodeproj/project.pbxproj @@ -2565,7 +2565,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 202209241; + CURRENT_PROJECT_VERSION = 202210071; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = FY8N9XTH66; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = FY8N9XTH66; @@ -2609,7 +2609,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 202209241; + CURRENT_PROJECT_VERSION = 202210071; DEVELOPMENT_TEAM = FY8N9XTH66; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = FY8N9XTH66; GENERATE_INFOPLIST_FILE = YES;