Skip to content

Commit

Permalink
Merge pull request #221 from L-j-h-c/feature/#205
Browse files Browse the repository at this point in the history
[Feat] #220 - 스크랩 기능 추가
  • Loading branch information
L-j-h-c authored Jul 23, 2022
2 parents 1c413d8 + a0c3440 commit 758eb5c
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 10 deletions.
12 changes: 6 additions & 6 deletions HealthFoodMe/HealthFoodMe.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2482,11 +2482,11 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = HealthFoodMe/HealthFoodMe.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = 4QG3GC35LA;
DEVELOPMENT_TEAM = FY8N9XTH66;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = HealthFoodMe/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "헬푸미";
Expand All @@ -2507,9 +2507,9 @@
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.healthFoodMe.releasedf;
PRODUCT_BUNDLE_IDENTIFIER = com.healthFoodMe.release;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = HealthFoodMe_Dev;
PROVISIONING_PROFILE_SPECIFIER = healthFood_dev;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 1;
Expand Down Expand Up @@ -2547,7 +2547,7 @@
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.healthFoodMe.releasedf;
PRODUCT_BUNDLE_IDENTIFIER = com.healthFoodMe.release;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = healthfood_distribution;
SWIFT_EMIT_LOC_STRINGS = YES;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,6 @@ class MainMapVC: UIViewController, NMFLocationManagerDelegate {
setMapView()
addObserver()
self.bindViewModels()

let temp: Double = 116.40000000000001
}

override func viewWillAppear(_ animated: Bool) {
Expand Down Expand Up @@ -411,7 +409,7 @@ extension MainMapVC {
initialMapOpened = true
let NMGPosition = self.locationManager?.currentLatLng()
if NMGPosition != nil {
self.mapView.moveCameraPositionWithZoom(LocationLiterals.gangnamStation, 1600)
self.mapView.moveCameraPositionWithZoom(LocationLiterals.gangnamStation, 2000)
}
isInitialPoint = true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ class SupplementMapVC: UIViewController, NMFLocationManagerDelegate {
bindMapView()
setPanGesture()
setInitialMarker()
setDelegate()
}

override func viewWillAppear(_ animated: Bool) {
Expand Down Expand Up @@ -146,11 +147,14 @@ extension SupplementMapVC {
}
}

private func setDelegate() {
mapDetailSummaryView.delegate = self
}

func setInitialMapPoint() {

switch mapType {
case .search:
print(initialId, "체크")
if let id = initialId {
self.bindSetSelectPointForSearchVC(id: id)
} else {
Expand Down Expand Up @@ -491,6 +495,12 @@ extension SupplementMapVC {
}
}

extension SupplementMapVC: MapDetailSummaryViewDelegate {
func MapDetailSummaryViewScarp() {
putScrap(userId: UserManager.shared.getUser ?? "", restaurantId: currentRestaurantId)
}
}

// MARK: - Network

extension SupplementMapVC {
Expand Down Expand Up @@ -552,4 +562,15 @@ extension SupplementMapVC {
}
}
}

private func putScrap(userId: String, restaurantId: String) {
UserService.shared.putScrap(userId: userId, restaurantId: restaurantId) { networkResult in
switch networkResult {
case .success(let message):
print(message)
default:
break;
}
}
}
}

0 comments on commit 758eb5c

Please sign in to comment.