From 0475994ec23858133494ddb48df37cb1863f4725 Mon Sep 17 00:00:00 2001 From: yungu0010 Date: Fri, 16 Feb 2024 15:11:19 +0900 Subject: [PATCH] =?UTF-8?q?[Fix]=20#232=20-=20getDevice=20=ED=95=A8?= =?UTF-8?q?=EC=88=98=20=EC=83=81=EC=88=98=EA=B0=92=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- iOS-NOTTODO/iOS-NOTTODO.xcodeproj/project.pbxproj | 14 +++++++++++--- .../Global/Extensions/Design/UIImage+.swift | 1 + .../iOS-NOTTODO/Global/Literals/Numbers.swift | 7 ++++++- .../iOS-NOTTODO/Global/Literals/Strings.swift | 2 +- .../AchievementViewController.swift | 4 ++-- .../DetailAchievementViewController.swift | 2 +- .../AddMission/Cells/DateCollectionViewCell.swift | 4 +--- .../ViewControllers/AddMissionViewController.swift | 4 ++-- .../DetailCalendarViewController.swift | 2 +- .../ViewControllers/HomeDeleteViewController.swift | 2 +- .../FifthOnboardingViewController.swift | 2 +- .../FourthOnboardingViewController.swift | 2 +- 12 files changed, 29 insertions(+), 17 deletions(-) diff --git a/iOS-NOTTODO/iOS-NOTTODO.xcodeproj/project.pbxproj b/iOS-NOTTODO/iOS-NOTTODO.xcodeproj/project.pbxproj index e30e510b..5103cada 100644 --- a/iOS-NOTTODO/iOS-NOTTODO.xcodeproj/project.pbxproj +++ b/iOS-NOTTODO/iOS-NOTTODO.xcodeproj/project.pbxproj @@ -46,8 +46,8 @@ 09A1465F2A192C4900DDC308 /* WeekMissionResponseDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09A1465E2A192C4900DDC308 /* WeekMissionResponseDTO.swift */; }; 09A146652A1964B500DDC308 /* AddAnotherDayResponseDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09A146642A19649A00DDC308 /* AddAnotherDayResponseDTO.swift */; }; 09C8602D2AB14B4800C4F4B1 /* FSCalendar in Frameworks */ = {isa = PBXBuildFile; productRef = 09C8602C2AB14B4800C4F4B1 /* FSCalendar */; }; - 09CF56042B09F23800526C8C /* HomeDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09CF56032B09F23800526C8C /* HomeDataSource.swift */; }; 09CF56022B09E98A00526C8C /* DetailAchieveHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09CF56012B09E98A00526C8C /* DetailAchieveHeaderView.swift */; }; + 09CF56042B09F23800526C8C /* HomeDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09CF56032B09F23800526C8C /* HomeDataSource.swift */; }; 09DCCD1F2A18ED76003DCF8A /* DailyMissionResponseDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09DCCD1E2A18ED76003DCF8A /* DailyMissionResponseDTO.swift */; }; 09DCCD212A18EF43003DCF8A /* HomeSevice.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09DCCD202A18EF43003DCF8A /* HomeSevice.swift */; }; 09DCCD232A18EFB0003DCF8A /* HomeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09DCCD222A18EFB0003DCF8A /* HomeAPI.swift */; }; @@ -117,6 +117,8 @@ 3B5F8F8329BF90290063A7F8 /* SituationCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B5F8F8229BF90290063A7F8 /* SituationCollectionViewCell.swift */; }; 3B5F8F8929BF9EFE0063A7F8 /* AddMissionLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B5F8F8829BF9EFE0063A7F8 /* AddMissionLabel.swift */; }; 3B710A5C2A62D4AB00E95620 /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 3B710A5B2A62D4AB00E95620 /* Settings.bundle */; }; + 3B80B5D52B7F304D00697250 /* adjust+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B80B5D42B7F304D00697250 /* adjust+.swift */; }; + 3B80B5D72B7F30E200697250 /* Numbers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B80B5D62B7F30E200697250 /* Numbers.swift */; }; 3B892AB82A2FBBAD00A316BC /* AddMissionService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B892AB72A2FBBAD00A316BC /* AddMissionService.swift */; }; 3B892ABB2A2FBD4C00A316BC /* RecommendSituationResponseDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B892ABA2A2FBD4C00A316BC /* RecommendSituationResponseDTO.swift */; }; 3B892ABE2A2FBDDE00A316BC /* AddMissionAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B892ABD2A2FBDDE00A316BC /* AddMissionAPI.swift */; }; @@ -212,8 +214,8 @@ 099FC98829B3233D005B37E6 /* CalendarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CalendarView.swift; sourceTree = ""; }; 09A1465E2A192C4900DDC308 /* WeekMissionResponseDTO.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WeekMissionResponseDTO.swift; sourceTree = ""; }; 09A146642A19649A00DDC308 /* AddAnotherDayResponseDTO.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddAnotherDayResponseDTO.swift; sourceTree = ""; }; - 09CF56032B09F23800526C8C /* HomeDataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeDataSource.swift; sourceTree = ""; }; 09CF56012B09E98A00526C8C /* DetailAchieveHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DetailAchieveHeaderView.swift; sourceTree = ""; }; + 09CF56032B09F23800526C8C /* HomeDataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeDataSource.swift; sourceTree = ""; }; 09DCCD1E2A18ED76003DCF8A /* DailyMissionResponseDTO.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DailyMissionResponseDTO.swift; sourceTree = ""; }; 09DCCD202A18EF43003DCF8A /* HomeSevice.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeSevice.swift; sourceTree = ""; }; 09DCCD222A18EFB0003DCF8A /* HomeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeAPI.swift; sourceTree = ""; }; @@ -280,6 +282,8 @@ 3B5F8F8229BF90290063A7F8 /* SituationCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SituationCollectionViewCell.swift; sourceTree = ""; }; 3B5F8F8829BF9EFE0063A7F8 /* AddMissionLabel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddMissionLabel.swift; sourceTree = ""; }; 3B710A5B2A62D4AB00E95620 /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Settings.bundle; sourceTree = ""; }; + 3B80B5D42B7F304D00697250 /* adjust+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "adjust+.swift"; sourceTree = ""; }; + 3B80B5D62B7F30E200697250 /* Numbers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Numbers.swift; sourceTree = ""; }; 3B892AB72A2FBBAD00A316BC /* AddMissionService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddMissionService.swift; sourceTree = ""; }; 3B892ABA2A2FBD4C00A316BC /* RecommendSituationResponseDTO.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RecommendSituationResponseDTO.swift; sourceTree = ""; }; 3B892ABD2A2FBDDE00A316BC /* AddMissionAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddMissionAPI.swift; sourceTree = ""; }; @@ -705,6 +709,7 @@ 3B11740C2A4B574B0033DDF3 /* CALayer+.swift */, 0943A9F82A53239200614761 /* Bundle+.swift */, 3B03D0D72B0F5EF300302872 /* CGSize+.swift */, + 3B80B5D42B7F304D00697250 /* adjust+.swift */, ); path = Extensions; sourceTree = ""; @@ -1126,6 +1131,7 @@ isa = PBXGroup; children = ( 6CF4706929A71D71008D145C /* Strings.swift */, + 3B80B5D62B7F30E200697250 /* Numbers.swift */, ); path = Literals; sourceTree = ""; @@ -1357,6 +1363,7 @@ 6CF4705B29A68EA9008D145C /* URLConstant.swift in Sources */, 3BD3B5C829B8F82C00D3575B /* AddMissionTextFieldView.swift in Sources */, 3B14518629C618920013DFB4 /* ActionCollectionViewCell.swift in Sources */, + 3B80B5D72B7F30E200697250 /* Numbers.swift in Sources */, 092E04B129BD9C86008A5892 /* MissionDetailCollectionViewCell.swift in Sources */, 6CF4706D29A739D9008D145C /* RecommendViewController.swift in Sources */, 3BC1A27429C9AF500088376B /* MissionHistoryCollectionViewCell.swift in Sources */, @@ -1421,6 +1428,7 @@ 6CF4706529A690E5008D145C /* NetworkBase.swift in Sources */, 099FC98129B3094F005B37E6 /* WeekMonthFSCalendar.swift in Sources */, 6C16016429C5E37D005AE3F5 /* MyInfoAccountStackView.swift in Sources */, + 3B80B5D52B7F304D00697250 /* adjust+.swift in Sources */, 09F6718229CAD86100708725 /* OnboardingCollectionViewCell.swift in Sources */, 6CF4707029A73A15008D145C /* RecommendActionViewController.swift in Sources */, 0943A9F92A53239200614761 /* Bundle+.swift in Sources */, @@ -1846,4 +1854,4 @@ /* End XCSwiftPackageProductDependency section */ }; rootObject = 3B027A6C299C31B500BEB65C /* Project object */; -} \ No newline at end of file +} diff --git a/iOS-NOTTODO/iOS-NOTTODO/Global/Extensions/Design/UIImage+.swift b/iOS-NOTTODO/iOS-NOTTODO/Global/Extensions/Design/UIImage+.swift index dcaec932..200c2dc1 100644 --- a/iOS-NOTTODO/iOS-NOTTODO/Global/Extensions/Design/UIImage+.swift +++ b/iOS-NOTTODO/iOS-NOTTODO/Global/Extensions/Design/UIImage+.swift @@ -61,6 +61,7 @@ extension UIImage { static var icBell: UIImage { UIImage(named: "ic_bell")! } static var icCircle: UIImage { UIImage(named: "acceptCircle")! } static var icStarbucks: UIImage { UIImage(named: "ic_starbucks")! } + static var icFeedback: UIImage { UIImage(named: "ic_feedback")! } // image diff --git a/iOS-NOTTODO/iOS-NOTTODO/Global/Literals/Numbers.swift b/iOS-NOTTODO/iOS-NOTTODO/Global/Literals/Numbers.swift index 176ff9ac..7dc038a8 100644 --- a/iOS-NOTTODO/iOS-NOTTODO/Global/Literals/Numbers.swift +++ b/iOS-NOTTODO/iOS-NOTTODO/Global/Literals/Numbers.swift @@ -5,4 +5,9 @@ // Created by 강윤서 on 2/16/24. // -import Foundation +import UIKit + +struct Numbers { + static let width: CGFloat = UIScreen.main.bounds.width + static let height: CGFloat = UIScreen.main.bounds.height +} diff --git a/iOS-NOTTODO/iOS-NOTTODO/Global/Literals/Strings.swift b/iOS-NOTTODO/iOS-NOTTODO/Global/Literals/Strings.swift index f4c002ef..d3fc239f 100644 --- a/iOS-NOTTODO/iOS-NOTTODO/Global/Literals/Strings.swift +++ b/iOS-NOTTODO/iOS-NOTTODO/Global/Literals/Strings.swift @@ -47,7 +47,7 @@ struct I18N { /// Achievement static let achievement = "성취" - static let total = "<매달 낫투두 성취 공유하고 선물받자!>\n인스타 @nottodo_official을 확인해주세요 :)" + static let total = "남겨주신 피드백으로\n새로운 기능을 업데이트 할 예정이에요 :)" /// Detail diff --git a/iOS-NOTTODO/iOS-NOTTODO/Presentation/Achievement/ViewControllers/AchievementViewController.swift b/iOS-NOTTODO/iOS-NOTTODO/Presentation/Achievement/ViewControllers/AchievementViewController.swift index 1f998bc4..28b52b0c 100644 --- a/iOS-NOTTODO/iOS-NOTTODO/Presentation/Achievement/ViewControllers/AchievementViewController.swift +++ b/iOS-NOTTODO/iOS-NOTTODO/Presentation/Achievement/ViewControllers/AchievementViewController.swift @@ -97,13 +97,13 @@ extension AchievementViewController { monthCalendar.snp.makeConstraints { $0.top.equalTo(achievementLabel.snp.bottom).offset(22) $0.directionalHorizontalEdges.equalTo(safeArea).inset(15) - $0.height.equalTo((getDeviceWidth()-30)*1.1) + $0.height.equalTo((Numbers.width-30)*1.1) } statisticsView.snp.makeConstraints { $0.top.equalTo(monthCalendar.snp.bottom) $0.directionalHorizontalEdges.equalTo(safeArea).inset(15) - $0.height.equalTo((getDeviceWidth()-30)*0.6) + $0.height.equalTo((Numbers.width-30)*0.6) $0.bottom.equalTo(scrollView.snp.bottom).inset(20) } } diff --git a/iOS-NOTTODO/iOS-NOTTODO/Presentation/Achievement/ViewControllers/DetailAchievementViewController.swift b/iOS-NOTTODO/iOS-NOTTODO/Presentation/Achievement/ViewControllers/DetailAchievementViewController.swift index 697ffb67..a2bc0d21 100644 --- a/iOS-NOTTODO/iOS-NOTTODO/Presentation/Achievement/ViewControllers/DetailAchievementViewController.swift +++ b/iOS-NOTTODO/iOS-NOTTODO/Presentation/Achievement/ViewControllers/DetailAchievementViewController.swift @@ -88,7 +88,7 @@ extension DetailAchievementViewController { collectionView.snp.makeConstraints { $0.center.equalTo(safeArea) $0.directionalHorizontalEdges.equalTo(safeArea).inset(15) - $0.height.equalTo(getDeviceWidth()*1.1) + $0.height.equalTo(Numbers.width*1.1) } } diff --git a/iOS-NOTTODO/iOS-NOTTODO/Presentation/AddMission/Cells/DateCollectionViewCell.swift b/iOS-NOTTODO/iOS-NOTTODO/Presentation/AddMission/Cells/DateCollectionViewCell.swift index dab64b92..213e292c 100644 --- a/iOS-NOTTODO/iOS-NOTTODO/Presentation/AddMission/Cells/DateCollectionViewCell.swift +++ b/iOS-NOTTODO/iOS-NOTTODO/Presentation/AddMission/Cells/DateCollectionViewCell.swift @@ -23,7 +23,6 @@ final class DateCollectionViewCell: UICollectionViewCell, AddMissionMenu { private lazy var tomorrow = Calendar.current.date(byAdding: .day, value: 1, to: today)! private var dateList: [String] = [] private var missionType: MissionType? - private var deviceWidth = UIScreen.main.bounds.width // MARK: - UI Components @@ -57,8 +56,7 @@ final class DateCollectionViewCell: UICollectionViewCell, AddMissionMenu { func setFoldState(_ state: FoldState) { fold = state - let deviceWidth = UIScreen.main.bounds.width - let cellWidth = deviceWidth * (345/375) + let cellWidth = Numbers.width * (345/375) let cellHeight = cellWidth * (470/345) missionCellHeight?(state == .folded ? 54 : cellHeight) updateUI() diff --git a/iOS-NOTTODO/iOS-NOTTODO/Presentation/AddMission/ViewControllers/AddMissionViewController.swift b/iOS-NOTTODO/iOS-NOTTODO/Presentation/AddMission/ViewControllers/AddMissionViewController.swift index 295494a4..543b50a2 100644 --- a/iOS-NOTTODO/iOS-NOTTODO/Presentation/AddMission/ViewControllers/AddMissionViewController.swift +++ b/iOS-NOTTODO/iOS-NOTTODO/Presentation/AddMission/ViewControllers/AddMissionViewController.swift @@ -216,7 +216,7 @@ extension AddMissionViewController { let layout = UICollectionViewFlowLayout() layout.scrollDirection = .vertical layout.minimumLineSpacing = 14 - layout.footerReferenceSize = CGSize(width: getDeviceWidth(), height: 319) + layout.footerReferenceSize = CGSize(width: Numbers.width, height: 319) return layout } @@ -382,7 +382,7 @@ extension AddMissionViewController: UICollectionViewDataSource { extension AddMissionViewController: UICollectionViewDelegateFlowLayout { func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { - let cellWidth: CGFloat = UIScreen.main.bounds.width - 40 + let cellWidth: CGFloat = Numbers.width - 40 let height = heightList[indexPath.row] return CGSize(width: cellWidth, height: height) diff --git a/iOS-NOTTODO/iOS-NOTTODO/Presentation/Home/ViewControllers/DetailCalendarViewController.swift b/iOS-NOTTODO/iOS-NOTTODO/Presentation/Home/ViewControllers/DetailCalendarViewController.swift index 0091f8d6..42921fef 100644 --- a/iOS-NOTTODO/iOS-NOTTODO/Presentation/Home/ViewControllers/DetailCalendarViewController.swift +++ b/iOS-NOTTODO/iOS-NOTTODO/Presentation/Home/ViewControllers/DetailCalendarViewController.swift @@ -118,7 +118,7 @@ extension DetailCalendarViewController { monthCalendar.snp.makeConstraints { $0.centerY.equalTo(safeArea) $0.directionalHorizontalEdges.equalTo(safeArea).inset(15) - $0.height.equalTo((getDeviceWidth()-30)*1.2) + $0.height.equalTo((Numbers.width-30)*1.2) } subLabel.snp.makeConstraints { diff --git a/iOS-NOTTODO/iOS-NOTTODO/Presentation/Home/ViewControllers/HomeDeleteViewController.swift b/iOS-NOTTODO/iOS-NOTTODO/Presentation/Home/ViewControllers/HomeDeleteViewController.swift index 92f94bf1..72b94a45 100644 --- a/iOS-NOTTODO/iOS-NOTTODO/Presentation/Home/ViewControllers/HomeDeleteViewController.swift +++ b/iOS-NOTTODO/iOS-NOTTODO/Presentation/Home/ViewControllers/HomeDeleteViewController.swift @@ -64,7 +64,7 @@ extension HomeDeleteViewController { deleteModalView.snp.makeConstraints { $0.directionalHorizontalEdges.equalTo(safeArea).inset(52) - $0.height.equalTo((getDeviceWidth() - 104)*1.09) + $0.height.equalTo((Numbers.width - 104)*1.09) $0.center.equalTo(safeArea) } } diff --git a/iOS-NOTTODO/iOS-NOTTODO/Presentation/Onboarding/ViewControllers/FifthOnboardingViewController.swift b/iOS-NOTTODO/iOS-NOTTODO/Presentation/Onboarding/ViewControllers/FifthOnboardingViewController.swift index 6c89b37f..9ba60cbc 100644 --- a/iOS-NOTTODO/iOS-NOTTODO/Presentation/Onboarding/ViewControllers/FifthOnboardingViewController.swift +++ b/iOS-NOTTODO/iOS-NOTTODO/Presentation/Onboarding/ViewControllers/FifthOnboardingViewController.swift @@ -96,7 +96,7 @@ extension FifthOnboardingViewController { } gradientView.snp.makeConstraints { $0.bottom.equalTo(nextButton.snp.top).offset(-90) - $0.top.equalTo(safeArea).offset(getDeviceHeight()*0.5) + $0.top.equalTo(safeArea).offset(Numbers.height*0.5) $0.directionalHorizontalEdges.equalTo(safeArea) } } diff --git a/iOS-NOTTODO/iOS-NOTTODO/Presentation/Onboarding/ViewControllers/FourthOnboardingViewController.swift b/iOS-NOTTODO/iOS-NOTTODO/Presentation/Onboarding/ViewControllers/FourthOnboardingViewController.swift index 4f2f5c5e..f38c3c7a 100644 --- a/iOS-NOTTODO/iOS-NOTTODO/Presentation/Onboarding/ViewControllers/FourthOnboardingViewController.swift +++ b/iOS-NOTTODO/iOS-NOTTODO/Presentation/Onboarding/ViewControllers/FourthOnboardingViewController.swift @@ -83,7 +83,7 @@ extension FourthOnboardingViewController { } gradientView.snp.makeConstraints { $0.bottom.equalTo(nextButton.snp.top) - $0.top.equalTo(safeArea).offset(getDeviceHeight()*0.5) + $0.top.equalTo(safeArea).offset(Numbers.height*0.5) $0.directionalHorizontalEdges.equalTo(safeArea) } }