Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions ACON-iOS/ACON-iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@
746261792D3EA8DF00A4E84F /* UploadTargetType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 746261782D3EA8D800A4E84F /* UploadTargetType.swift */; };
7462617B2D3EB06100A4E84F /* UploadService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7462617A2D3EB05A00A4E84F /* UploadService.swift */; };
7462617F2D3F9F1400A4E84F /* GetSpotDetailResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7462617E2D3F9F0300A4E84F /* GetSpotDetailResponse.swift */; };
746261832D3F9FD900A4E84F /* GetSpotMenuResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 746261822D3F9FC600A4E84F /* GetSpotMenuResponse.swift */; };
746261892D3FA29C00A4E84F /* SpotDetailTargetType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 746261882D3FA29400A4E84F /* SpotDetailTargetType.swift */; };
7462618B2D3FA4A800A4E84F /* SpotDetailService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7462618A2D3FA4A200A4E84F /* SpotDetailService.swift */; };
7462D0252D4262F300580464 /* AuthManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7462D0242D4262EF00580464 /* AuthManager.swift */; };
Expand Down Expand Up @@ -518,7 +517,6 @@
746261782D3EA8D800A4E84F /* UploadTargetType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UploadTargetType.swift; sourceTree = "<group>"; };
7462617A2D3EB05A00A4E84F /* UploadService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UploadService.swift; sourceTree = "<group>"; };
7462617E2D3F9F0300A4E84F /* GetSpotDetailResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GetSpotDetailResponse.swift; sourceTree = "<group>"; };
746261822D3F9FC600A4E84F /* GetSpotMenuResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GetSpotMenuResponse.swift; sourceTree = "<group>"; };
746261882D3FA29400A4E84F /* SpotDetailTargetType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpotDetailTargetType.swift; sourceTree = "<group>"; };
7462618A2D3FA4A200A4E84F /* SpotDetailService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpotDetailService.swift; sourceTree = "<group>"; };
7462D0242D4262EF00580464 /* AuthManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthManager.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1299,7 +1297,6 @@
7462617D2D3F9E9D00A4E84F /* DTO */ = {
isa = PBXGroup;
children = (
746261822D3F9FC600A4E84F /* GetSpotMenuResponse.swift */,
1503DBEA2DFD9CBB001FC3E5 /* GetMenuboardImageListResponse.swift */,
7462617E2D3F9F0300A4E84F /* GetSpotDetailResponse.swift */,
);
Expand Down Expand Up @@ -2351,7 +2348,6 @@
74A13D672DCBC2BD007FFFC3 /* DislikeFoodCollectionViewCell.swift in Sources */,
D652597C2D62775C00B8176E /* CustomTextFieldView.swift in Sources */,
741429602D5D391000B69528 /* SettingType.swift in Sources */,
746261832D3F9FD900A4E84F /* GetSpotMenuResponse.swift in Sources */,
746A13BB2E0055120097DA25 /* PutOnboardingRequest.swift in Sources */,
15CD25842D40364F00320006 /* LoginModalView.swift in Sources */,
74B594B62E3CB02800CEFDB1 /* NaverSearchTargetType.swift in Sources */,
Expand Down Expand Up @@ -2436,7 +2432,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2025.0807.0103;
CURRENT_PROJECT_VERSION = 2025.0811.0035;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = KX5Q77JSUF;
Expand Down Expand Up @@ -2479,7 +2475,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2025.0807.0103;
CURRENT_PROJECT_VERSION = 2025.0811.0035;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = KX5Q77JSUF;
GENERATE_INFOPLIST_FILE = NO;
Expand Down
2 changes: 1 addition & 1 deletion ACON-iOS/ACON-iOS/Global/Settings/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>2025.0807.0103</string>
<string>2025.0811.0035</string>
<key>GADApplicationIdentifier</key>
<string>${GAD_APPLICATION_IDENTIFIER}</string>
<key>GAD_AD_UNIT_ID</key>
Expand Down
13 changes: 9 additions & 4 deletions ACON-iOS/ACON-iOS/Global/UIComponents/ACButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,16 @@ extension ACButton {

extension ACButton {

func updateButtonTitle(_ title: String) {
self.title = title
self.setAttributedTitle(text: title,
func updateButtonTitle(_ title: String? = nil,
color: UIColor? = nil) {

if let title = title {
self.title = title
}

self.setAttributedTitle(text: self.title ?? "",
style: buttonStyleType.textStyle,
color: buttonStyleType.textColor)
color: color ?? buttonStyleType.textColor)
}

func updateButtonImage(_ image: UIImage) {
Expand Down
7 changes: 5 additions & 2 deletions ACON-iOS/ACON-iOS/Global/Utils/Enums/HeaderType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@ enum HeaderType {
}

static func tokenOnly() -> [String:String] {
let token = UserDefaults.standard.string(forKey: StringLiterals.UserDefaults.accessToken) ?? ""
return ["Authorization" : "Bearer " + token]
if let token = UserDefaults.standard.string(forKey: StringLiterals.UserDefaults.accessToken) {
return ["Authorization" : "Bearer " + token]
} else {
return noHeader
}
}

}
2 changes: 1 addition & 1 deletion ACON-iOS/ACON-iOS/Network/Image/ImageTargetType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ extension ImageTargetType: ACTargetType {
var headers: [String : String]? {
switch self {
case .getPresignedURL:
return HeaderType.noHeader
return HeaderType.tokenOnly()
case .putImageToPresignedURL(let requestBody):
return HeaderType.imageHeader(imageData: requestBody.imageData)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ extension OnboardingTargetType: ACTargetType {
}

var headers: [String : String]? {
var headers = HeaderType.noHeader
var headers = HeaderType.headerWithToken()
switch self {
case .putOnboarding:
headers = HeaderType.headerWithToken()
Expand Down
26 changes: 0 additions & 26 deletions ACON-iOS/ACON-iOS/Network/SpotDetail/DTO/GetSpotMenuResponse.swift

This file was deleted.

15 changes: 0 additions & 15 deletions ACON-iOS/ACON-iOS/Network/SpotDetail/SpotDetailService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ protocol SpotDetailServiceProtocol {
func getSpotDetail(spotID: Int64,
isDeepLink: Bool,
completion: @escaping (NetworkResult<GetSpotDetailResponse>) -> Void)
func getSpotMenu(spotID: Int64,
completion: @escaping (NetworkResult<GetSpotMenuResponse>) -> Void)
func getSpotMenuboardImageList(spotID: Int64,
completion: @escaping (NetworkResult<GetMenuboardImageListResponse>) -> Void)
func postGuidedSpot(spotID: Int64,
Expand Down Expand Up @@ -44,19 +42,6 @@ final class SpotDetailService: BaseService<SpotDetailTargetType>,
}
}

func getSpotMenu(spotID: Int64,
completion: @escaping (NetworkResult<GetSpotMenuResponse>) -> Void) {
self.provider.request(.getSpotMenu(spotID: spotID)) { result in
switch result {
case .success(let response):
let networkResult: NetworkResult<GetSpotMenuResponse> = self.judgeStatus(statusCode: response.statusCode, data: response.data, type: GetSpotMenuResponse.self)
completion(networkResult)
case .failure:
completion(.networkFail)
}
}
}

func getSpotMenuboardImageList(spotID: Int64,
completion: @escaping (NetworkResult<GetMenuboardImageListResponse>) -> Void) {
self.provider.request(.getMenuboardImageList(spotID: spotID)) { result in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import Moya
enum SpotDetailTargetType {

case getSpotDetail(spotID: Int64, isDeepLink: Bool)
case getSpotMenu(spotID: Int64)
case getMenuboardImageList(spotID: Int64)
case postGuidedSpot(spotID: Int64)
case postSavedSpot(spotID: Int64)
Expand All @@ -37,8 +36,6 @@ extension SpotDetailTargetType: ACTargetType {
switch self {
case .getSpotDetail(let spotID, _):
return utilPath + "spots/\(spotID)"
case .getSpotMenu(let spotID):
return utilPath + "spots/\(spotID)/menus"
case .getMenuboardImageList(let spotID):
return utilPath + "spots/\(spotID)/menuboards"
case .postGuidedSpot:
Expand Down Expand Up @@ -74,7 +71,7 @@ extension SpotDetailTargetType: ACTargetType {
var headers: [String : String]? {
var headers = HeaderType.noHeader
switch self {
case .getSpotMenu, .getMenuboardImageList:
case .getMenuboardImageList:
headers = HeaderType.noHeader
case .postGuidedSpot, .postSavedSpot:
headers = HeaderType.headerWithToken()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ extension SpotUploadTargetType: ACTargetType {
}

var headers: [String : String]? {
var headers = HeaderType.noHeader
var headers = HeaderType.tokenOnly()
switch self {
case .postSpotUpload:
headers = HeaderType.headerWithToken()
Expand Down
6 changes: 2 additions & 4 deletions ACON-iOS/ACON-iOS/Network/Upload/UploadTargetType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,9 @@ extension UploadTargetType: ACTargetType {
}

var headers: [String : String]? {
var headers = HeaderType.noHeader
var headers = HeaderType.headerWithToken()
switch self {
case .getSearchKeyword:
headers = HeaderType.noHeader
case .getReviewVerification:
case .getSearchKeyword, .getReviewVerification:
headers = HeaderType.tokenOnly()
case .getSearchSuggestion, .postReview, .getAcornCount:
headers = HeaderType.headerWithToken()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,15 @@ final class DislikeFoodCollectionViewCell: BaseCollectionViewCell {
var isChipEnabled: Bool {
didSet {
if isChipEnabled {
self.chipButton.updateGlassButtonState(state: .default)
self.chipButton.do {
$0.refreshButtonBlurEffect(.buttonGlassDefault)
$0.updateButtonTitle(color: .acWhite)
}
} else {
self.chipButton.updateGlassButtonState(state: .disabled)
self.chipButton.do {
$0.refreshButtonBlurEffect(.buttonGlassDisabled)
$0.updateButtonTitle(color: .gray300)
}
Comment on lines 32 to +41
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐿️ 삼항연산자 사용하면 깔끔해질 것 같아요!

}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,11 @@ extension OnboardingViewController: UICollectionViewDelegateFlowLayout {

if cell.isChipSelected {
/// 해산물 예외처리
if selectedFood.value == nil || selectedFood.value == [] {
selectedFood.value = []
disableNoDislikeFoodButton()
enableAllCells(true)
}
if indexPath.item == 6 {
for i in 0..<6 {
let seafoodIndexPath = IndexPath(item: i, section: indexPath.section)
Expand All @@ -188,10 +193,6 @@ extension OnboardingViewController: UICollectionViewDelegateFlowLayout {
}
}
if !(selectedFood.value?.contains(DislikeFood.engValue[indexPath.item]) ?? false) {
if selectedFood.value == nil {
selectedFood.value = []
onboardingView.noDislikeFoodButton.updateGlassButtonState(state: .disabled)
}
selectedFood.value?.append(DislikeFood.engValue[indexPath.item])
}
} else {
Expand All @@ -200,6 +201,7 @@ extension OnboardingViewController: UICollectionViewDelegateFlowLayout {
if selectedFood.value == [] {
selectedFood.value = nil
onboardingView.noDislikeFoodButton.updateGlassButtonState(state: .default)
enableAllCells(true)
}
}
}
Expand Down Expand Up @@ -272,10 +274,18 @@ extension OnboardingViewController {
private func enableAllCells(_ enable: Bool) {
for cell in onboardingView.dislikeFoodCollectionView.visibleCells {
if let cell = cell as? DislikeFoodCollectionViewCell {
cell.isUserInteractionEnabled = enable
if !enable { cell.isChipSelected = false }
cell.isChipEnabled = enable
}
}
}

private func disableNoDislikeFoodButton() {
onboardingView.noDislikeFoodButton.do {
$0.updateGlassButtonState(state: .default)
$0.refreshButtonBlurEffect(.buttonGlassDisabled)
$0.updateButtonTitle(color: .gray300)
}
}

}