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; 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/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)" 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 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..3b0e91e7 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) @@ -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 } 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 e2eb334f..9faa591c 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 9688ed09..4c2f062a 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