From 7f8e02098a88fad04a0adf94a2af76480f707631 Mon Sep 17 00:00:00 2001 From: chaeyoung103 Date: Fri, 24 Mar 2023 17:12:33 +0900 Subject: [PATCH 1/2] =?UTF-8?q?[fix]:=20=EC=96=B8=EC=96=B4=20=EC=98=81?= =?UTF-8?q?=EC=96=B4=20->=20=ED=95=9C=EA=B5=AD=EC=96=B4=20=EB=A1=9C=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD=20=EB=B0=8F=20=EC=B9=B4=ED=85=8C=EA=B3=A0?= =?UTF-8?q?=EB=A6=AC=20=EA=B8=B0=EB=B3=B8=EA=B0=92=EC=98=A4=EB=A5=98=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20(=ED=81=B4=EB=A1=9C=EC=A0=B8=EB=B0=A9?= =?UTF-8?q?=EC=8B=9D=EC=9C=BC=EB=A1=9C=20=EB=8D=B0=EC=9D=B4=ED=84=B0=20?= =?UTF-8?q?=EC=A0=84=EB=8B=AC=20=EB=B3=80=EA=B2=BD)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Todoary-iOS/Todoary.xcodeproj/project.pbxproj | 7 ++++++ .../Category/CategoryViewController.swift | 2 +- .../SummaryBottomSheetViewController.swift | 2 +- .../Todo/ColorPickerViewController.swift | 7 ++++-- .../Todo/TodoSettingViewController.swift | 25 +++++++++++++------ .../User/Login/LoginViewController.swift | 1 + .../Resource/Storyboard/ko.lproj/Main.strings | 1 + .../ko.lproj/LaunchScreen.strings | 1 + 8 files changed, 34 insertions(+), 12 deletions(-) create mode 100644 Todoary-iOS/Todoary/Resource/Storyboard/ko.lproj/Main.strings create mode 100644 Todoary-iOS/Todoary/SupportingFiles/ko.lproj/LaunchScreen.strings diff --git a/Todoary-iOS/Todoary.xcodeproj/project.pbxproj b/Todoary-iOS/Todoary.xcodeproj/project.pbxproj index 6e52acac..31f21a9c 100644 --- a/Todoary-iOS/Todoary.xcodeproj/project.pbxproj +++ b/Todoary-iOS/Todoary.xcodeproj/project.pbxproj @@ -400,6 +400,8 @@ ACBAE579297ADFD600E71CAD /* FcmTokenService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FcmTokenService.swift; sourceTree = ""; }; ACBAE57B297AE8B500E71CAD /* FcmTokenRequestModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FcmTokenRequestModel.swift; sourceTree = ""; }; ACBF6654ED1E38A919A0780B /* Pods-Todoary-TodoaryUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Todoary-TodoaryUITests.release.xcconfig"; path = "Target Support Files/Pods-Todoary-TodoaryUITests/Pods-Todoary-TodoaryUITests.release.xcconfig"; sourceTree = ""; }; + ACC42A7729CD6F3100D5A4F3 /* ko */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ko; path = ko.lproj/Main.strings; sourceTree = ""; }; + ACC42A7829CD6F3200D5A4F3 /* ko */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ko; path = ko.lproj/LaunchScreen.strings; sourceTree = ""; }; ACCD87C528965B7700C34CE7 /* TodoCategoryCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TodoCategoryCell.swift; sourceTree = ""; }; ACE7D5F928A819A70093854A /* PinNumberSettingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PinNumberSettingViewController.swift; sourceTree = ""; }; ACE7D5FB28A819C10093854A /* PinNumberSettingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PinNumberSettingView.swift; sourceTree = ""; }; @@ -1564,6 +1566,7 @@ knownRegions = ( en, Base, + ko, ); mainGroup = 572E5ACD286EBDCC00D1FAA0; packageReferences = ( @@ -1958,6 +1961,7 @@ isa = PBXVariantGroup; children = ( 572E5AE0286EBDCC00D1FAA0 /* Base */, + ACC42A7729CD6F3100D5A4F3 /* ko */, ); name = Main.storyboard; sourceTree = ""; @@ -1966,6 +1970,7 @@ isa = PBXVariantGroup; children = ( 572E5AE5286EBDCE00D1FAA0 /* Base */, + ACC42A7829CD6F3200D5A4F3 /* ko */, ); name = LaunchScreen.storyboard; sourceTree = ""; @@ -1977,6 +1982,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; @@ -2038,6 +2044,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; diff --git a/Todoary-iOS/Todoary/Presentation/ViewControllers/Summary/Category/CategoryViewController.swift b/Todoary-iOS/Todoary/Presentation/ViewControllers/Summary/Category/CategoryViewController.swift index 844e947b..43a5eb57 100644 --- a/Todoary-iOS/Todoary/Presentation/ViewControllers/Summary/Category/CategoryViewController.swift +++ b/Todoary-iOS/Todoary/Presentation/ViewControllers/Summary/Category/CategoryViewController.swift @@ -323,7 +323,7 @@ extension CategoryViewController: UITableViewDelegate, UITableViewDataSource{ func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { if(indexPath.row == tableView.numberOfRows(inSection: 0) - 1){ let vc = TodoSettingViewController() - TodoSettingViewController.selectCategory = categories[selectCategoryIndex.row].id + vc.selectCategory = categories[selectCategoryIndex.row].id self.navigationController?.pushViewController(vc, animated: true) return } diff --git a/Todoary-iOS/Todoary/Presentation/ViewControllers/Summary/Home/SummaryBottomSheetViewController.swift b/Todoary-iOS/Todoary/Presentation/ViewControllers/Summary/Home/SummaryBottomSheetViewController.swift index 276cc4d9..4c9226ed 100644 --- a/Todoary-iOS/Todoary/Presentation/ViewControllers/Summary/Home/SummaryBottomSheetViewController.swift +++ b/Todoary-iOS/Todoary/Presentation/ViewControllers/Summary/Home/SummaryBottomSheetViewController.swift @@ -458,7 +458,7 @@ extension SummaryBottomSheetViewController: SelectedTableViewCellDeliver{ let vc = TodoSettingViewController() vc.todoSettingData = tapCell.todo - TodoSettingViewController.selectCategory = tapCell.todo.categoryId + vc.selectCategory = tapCell.todo.categoryId self.homeNavigaiton.pushViewController(vc, animated: true) } diff --git a/Todoary-iOS/Todoary/Presentation/ViewControllers/Todo/ColorPickerViewController.swift b/Todoary-iOS/Todoary/Presentation/ViewControllers/Todo/ColorPickerViewController.swift index 0831582d..274472e3 100644 --- a/Todoary-iOS/Todoary/Presentation/ViewControllers/Todo/ColorPickerViewController.swift +++ b/Todoary-iOS/Todoary/Presentation/ViewControllers/Todo/ColorPickerViewController.swift @@ -18,6 +18,9 @@ class ColorPickerViewController : BaseViewController, UITextFieldDelegate{ private var ColorPickerCollectionView: UICollectionView! + //카테고리 id 전달 클로져 + var completionHandler: ((Int) -> ())? + //선택된 컬러값 var selectColor : Int! @@ -180,7 +183,7 @@ class ColorPickerViewController : BaseViewController, UITextFieldDelegate{ print("로그: [requestGenerateCategory] success") if let categorydata = data as? CategoryResultModel{ self.navigationController?.popViewController(animated: true) - TodoSettingViewController.selectCategory = (categorydata.categoryId)! + completionHandler?(categorydata.categoryId ?? -1) } break @@ -233,7 +236,7 @@ class ColorPickerViewController : BaseViewController, UITextFieldDelegate{ switch result{ case .success: print("로그: [requestDeleteCategory] success") - TodoSettingViewController.selectCategory = -1 + completionHandler?(-1) self.navigationController?.popViewController(animated: true) break default: diff --git a/Todoary-iOS/Todoary/Presentation/ViewControllers/Todo/TodoSettingViewController.swift b/Todoary-iOS/Todoary/Presentation/ViewControllers/Todo/TodoSettingViewController.swift index 471f4c9f..f44f6700 100644 --- a/Todoary-iOS/Todoary/Presentation/ViewControllers/Todo/TodoSettingViewController.swift +++ b/Todoary-iOS/Todoary/Presentation/ViewControllers/Todo/TodoSettingViewController.swift @@ -21,12 +21,13 @@ import Then class TodoSettingViewController : BaseViewController, AlarmComplete, CalendarComplete, UITextFieldDelegate{ + var completion: ((TodoResultModel) -> Void)? //카테고리 정보 받아오는 struct var categoryData : [CategoryModel]! = [] //선택된 카테고리 - static var selectCategory: Int = -1 + var selectCategory: Int = -1 var dateFormatter = DateFormatter() @@ -164,7 +165,7 @@ class TodoSettingViewController : BaseViewController, AlarmComplete, CalendarCom targetDate: todoSettingData.targetDate, isAlarmEnabled: todoSettingData.isAlarmEnabled, targetTime: todoSettingData.targetTime ?? "", - categoryId: TodoSettingViewController.selectCategory) + categoryId: selectCategory) requestModifyTodo(id: todoSettingData.todoId, parameter: todoRequest) } @@ -189,7 +190,7 @@ class TodoSettingViewController : BaseViewController, AlarmComplete, CalendarCom targetDate: todoSettingData.targetDate, isAlarmEnabled: todoSettingData.isAlarmEnabled, targetTime: todoSettingData.targetTime ?? "", - categoryId: TodoSettingViewController.selectCategory) + categoryId: selectCategory) requestGenerateTodo(parameter: todoRequest) } } @@ -201,6 +202,10 @@ class TodoSettingViewController : BaseViewController, AlarmComplete, CalendarCom colorPickerViewController.mainView.confirmBtn.isHidden = true + colorPickerViewController.completionHandler = {id in + self.selectCategory = id + } + self.navigationController?.pushViewController(colorPickerViewController, animated: true) self.navigationController?.isNavigationBarHidden = true } @@ -248,6 +253,10 @@ class TodoSettingViewController : BaseViewController, AlarmComplete, CalendarCom colorPickerViewController.categoryData = CategoryData(id: categoryData[indexPath.row].id, title: categoryData[indexPath.row].title, color: categoryData[indexPath.row].color) + colorPickerViewController.completionHandler = {id in + self.selectCategory = id + } + self.navigationController?.pushViewController(colorPickerViewController, animated: true) self.navigationController?.isNavigationBarHidden = true } @@ -282,7 +291,7 @@ class TodoSettingViewController : BaseViewController, AlarmComplete, CalendarCom dateFormatter.locale = Locale(identifier: "en_US") mainView.time.setTitle(dateFormatter.string(from: initTime!), for: .normal) - TodoSettingViewController.selectCategory = todoSettingData.categoryId + selectCategory = todoSettingData.categoryId } @@ -365,8 +374,8 @@ class TodoSettingViewController : BaseViewController, AlarmComplete, CalendarCom }else { categoryData = categorydata //카테고리 초기값 설정 - if TodoSettingViewController.selectCategory == -1{ - TodoSettingViewController.selectCategory = categoryData[0].id + if selectCategory == -1{ + selectCategory = categoryData[0].id } mainView.collectionView.reloadData() } @@ -437,7 +446,7 @@ extension TodoSettingViewController: UICollectionViewDelegate, UICollectionViewD cell.setBtnAttribute(title: categoryData[indexPath.row].title, color: .categoryColor[ categoryData[indexPath.row].color]) cell.categoryLabel.layer.borderColor = UIColor.categoryColor[ categoryData[indexPath.row].color].cgColor - if TodoSettingViewController.selectCategory == categoryData[indexPath.row].id { + if selectCategory == categoryData[indexPath.row].id { collectionView.selectItem(at: indexPath, animated: false, scrollPosition: .init()) cell.categoryLabel.backgroundColor = .categoryColor[categoryData[indexPath.row].color] cell.setBtnAttribute(title: categoryData[indexPath.row].title, color: .white) @@ -456,7 +465,7 @@ extension TodoSettingViewController: UICollectionViewDelegate, UICollectionViewD guard let cell = collectionView.cellForItem(at:indexPath) as? TodoCategoryCell else{ fatalError() } - TodoSettingViewController.selectCategory = categoryData[indexPath.row].id + selectCategory = categoryData[indexPath.row].id cell.categoryLabel.backgroundColor = .categoryColor[categoryData[indexPath.row].color] cell.setBtnAttribute(title: categoryData[indexPath.row].title, color: .white) cell.categoryLabel.isUserInteractionEnabled = true diff --git a/Todoary-iOS/Todoary/Presentation/ViewControllers/User/Login/LoginViewController.swift b/Todoary-iOS/Todoary/Presentation/ViewControllers/User/Login/LoginViewController.swift index b88240de..fa845052 100644 --- a/Todoary-iOS/Todoary/Presentation/ViewControllers/User/Login/LoginViewController.swift +++ b/Todoary-iOS/Todoary/Presentation/ViewControllers/User/Login/LoginViewController.swift @@ -404,6 +404,7 @@ extension LoginViewController: ASAuthorizationControllerPresentationContextProvi case .success(let data): print("LOG: SUCCESS APLLE LOGIN", data) UserManager.isFirstTime = false + UserManager.defaultImg = true guard let data = data as? AppleSignUpResultModel else { return } KeyChain.create(key: Const.UserDefaults.appleIdentifier, value: parameter.userIdentifier) KeyChain.create(key: Const.UserDefaults.appleRefreshToken, value: data.appleRefreshToken) diff --git a/Todoary-iOS/Todoary/Resource/Storyboard/ko.lproj/Main.strings b/Todoary-iOS/Todoary/Resource/Storyboard/ko.lproj/Main.strings new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/Todoary-iOS/Todoary/Resource/Storyboard/ko.lproj/Main.strings @@ -0,0 +1 @@ + diff --git a/Todoary-iOS/Todoary/SupportingFiles/ko.lproj/LaunchScreen.strings b/Todoary-iOS/Todoary/SupportingFiles/ko.lproj/LaunchScreen.strings new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/Todoary-iOS/Todoary/SupportingFiles/ko.lproj/LaunchScreen.strings @@ -0,0 +1 @@ + From c935886b218fd29b00c70a2540004551143fc2e9 Mon Sep 17 00:00:00 2001 From: chaeyoung103 Date: Fri, 24 Mar 2023 17:42:36 +0900 Subject: [PATCH 2/2] =?UTF-8?q?[fix]:=20=EC=95=A0=ED=94=8C=EB=A1=9C?= =?UTF-8?q?=EA=B7=B8=EC=9D=B8=20=EC=8B=9C=20=ED=94=84=EB=A1=9C=ED=95=84=20?= =?UTF-8?q?=EC=82=AC=EC=A7=84=20=EA=B8=B0=EB=B3=B8=EA=B0=92=EC=98=A4?= =?UTF-8?q?=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ViewControllers/Summary/Home/HomeViewController.swift | 2 +- .../ViewControllers/User/Account/AccountViewController.swift | 2 +- .../ViewControllers/User/Profile/ProfileViewController.swift | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Todoary-iOS/Todoary/Presentation/ViewControllers/Summary/Home/HomeViewController.swift b/Todoary-iOS/Todoary/Presentation/ViewControllers/Summary/Home/HomeViewController.swift index 530b71ba..5084bf6b 100644 --- a/Todoary-iOS/Todoary/Presentation/ViewControllers/Summary/Home/HomeViewController.swift +++ b/Todoary-iOS/Todoary/Presentation/ViewControllers/Summary/Home/HomeViewController.swift @@ -250,7 +250,7 @@ class HomeViewController : UIViewController { if UserDefaults.standard.bool(forKey: "defaultImg") != true { if (profileData.profileImgUrl != nil){ let url = URL(string: profileData.profileImgUrl!) - mainView.profileImage.kf.setImage(with: url, for: .normal) + mainView.profileImage.kf.setImage(with: url!, for: .normal, placeholder: UIImage(named: "profile")) } }else{ mainView.profileImage.setImage(UIImage(named: "profile"), for: .normal) diff --git a/Todoary-iOS/Todoary/Presentation/ViewControllers/User/Account/AccountViewController.swift b/Todoary-iOS/Todoary/Presentation/ViewControllers/User/Account/AccountViewController.swift index 923ad91b..b1e38362 100644 --- a/Todoary-iOS/Todoary/Presentation/ViewControllers/User/Account/AccountViewController.swift +++ b/Todoary-iOS/Todoary/Presentation/ViewControllers/User/Account/AccountViewController.swift @@ -119,7 +119,7 @@ class AccountViewController : BaseViewController { if UserDefaults.standard.bool(forKey: "defaultImg") != true { if (profileData.profileImgUrl != nil){ let url = URL(string: profileData.profileImgUrl!) - mainView.profileImage.kf.setImage(with: url!) + mainView.profileImage.kf.setImage(with: url!, placeholder:UIImage(named: "profile")) } }else{ mainView.profileImage.image = UIImage(named: "profile") diff --git a/Todoary-iOS/Todoary/Presentation/ViewControllers/User/Profile/ProfileViewController.swift b/Todoary-iOS/Todoary/Presentation/ViewControllers/User/Profile/ProfileViewController.swift index 660d6c24..eefd321c 100644 --- a/Todoary-iOS/Todoary/Presentation/ViewControllers/User/Profile/ProfileViewController.swift +++ b/Todoary-iOS/Todoary/Presentation/ViewControllers/User/Profile/ProfileViewController.swift @@ -218,7 +218,7 @@ extension ProfileViewController { if UserDefaults.standard.bool(forKey: "defaultImg") != true { if (profileData.profileImgUrl != nil){ let url = URL(string: profileData.profileImgUrl!) - mainView.profileImage.kf.setImage(with: url!) + mainView.profileImage.kf.setImage(with: url!, placeholder:UIImage(named: "profile")) } }else{ mainView.profileImage.image = UIImage(named: "profile")