Skip to content

Commit

Permalink
Merge pull request #454 from Todoary/Fix-viewSeperate
Browse files Browse the repository at this point in the history
Bug/ 앱스토어 등록 후 발견된 버그 수정
  • Loading branch information
dev-muuu authored Mar 24, 2023
2 parents bc8603c + 7385bfc commit 10d4774
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 15 deletions.
7 changes: 7 additions & 0 deletions Todoary-iOS/Todoary.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,8 @@
ACBAE579297ADFD600E71CAD /* FcmTokenService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FcmTokenService.swift; sourceTree = "<group>"; };
ACBAE57B297AE8B500E71CAD /* FcmTokenRequestModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FcmTokenRequestModel.swift; sourceTree = "<group>"; };
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 = "<group>"; };
ACC42A7729CD6F3100D5A4F3 /* ko */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ko; path = ko.lproj/Main.strings; sourceTree = "<group>"; };
ACC42A7829CD6F3200D5A4F3 /* ko */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ko; path = ko.lproj/LaunchScreen.strings; sourceTree = "<group>"; };
ACCD87C528965B7700C34CE7 /* TodoCategoryCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TodoCategoryCell.swift; sourceTree = "<group>"; };
ACE7D5F928A819A70093854A /* PinNumberSettingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PinNumberSettingViewController.swift; sourceTree = "<group>"; };
ACE7D5FB28A819C10093854A /* PinNumberSettingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PinNumberSettingView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1564,6 +1566,7 @@
knownRegions = (
en,
Base,
ko,
);
mainGroup = 572E5ACD286EBDCC00D1FAA0;
packageReferences = (
Expand Down Expand Up @@ -1958,6 +1961,7 @@
isa = PBXVariantGroup;
children = (
572E5AE0286EBDCC00D1FAA0 /* Base */,
ACC42A7729CD6F3100D5A4F3 /* ko */,
);
name = Main.storyboard;
sourceTree = "<group>";
Expand All @@ -1966,6 +1970,7 @@
isa = PBXVariantGroup;
children = (
572E5AE5286EBDCE00D1FAA0 /* Base */,
ACC42A7829CD6F3200D5A4F3 /* ko */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
Expand All @@ -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";
Expand Down Expand Up @@ -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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ class ColorPickerViewController : BaseViewController, UITextFieldDelegate{

private var ColorPickerCollectionView: UICollectionView!

//카테고리 id 전달 클로져
var completionHandler: ((Int) -> ())?

//선택된 컬러값
var selectColor : Int!

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -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)
}

Expand All @@ -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)
}
}
Expand All @@ -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
}
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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

}

Expand Down Expand Up @@ -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()
}
Expand Down Expand Up @@ -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)
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

0 comments on commit 10d4774

Please sign in to comment.