Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat] #232 - 성취 뷰 하단 에셋과 문구 변경 #234

Merged
merged 5 commits into from
Feb 18, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
14 changes: 11 additions & 3 deletions iOS-NOTTODO/iOS-NOTTODO.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 */; };
Expand Down Expand Up @@ -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 */; };
Expand Down Expand Up @@ -212,8 +214,8 @@
099FC98829B3233D005B37E6 /* CalendarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CalendarView.swift; sourceTree = "<group>"; };
09A1465E2A192C4900DDC308 /* WeekMissionResponseDTO.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WeekMissionResponseDTO.swift; sourceTree = "<group>"; };
09A146642A19649A00DDC308 /* AddAnotherDayResponseDTO.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddAnotherDayResponseDTO.swift; sourceTree = "<group>"; };
09CF56032B09F23800526C8C /* HomeDataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeDataSource.swift; sourceTree = "<group>"; };
09CF56012B09E98A00526C8C /* DetailAchieveHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DetailAchieveHeaderView.swift; sourceTree = "<group>"; };
09CF56032B09F23800526C8C /* HomeDataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeDataSource.swift; sourceTree = "<group>"; };
09DCCD1E2A18ED76003DCF8A /* DailyMissionResponseDTO.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DailyMissionResponseDTO.swift; sourceTree = "<group>"; };
09DCCD202A18EF43003DCF8A /* HomeSevice.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeSevice.swift; sourceTree = "<group>"; };
09DCCD222A18EFB0003DCF8A /* HomeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeAPI.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -280,6 +282,8 @@
3B5F8F8229BF90290063A7F8 /* SituationCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SituationCollectionViewCell.swift; sourceTree = "<group>"; };
3B5F8F8829BF9EFE0063A7F8 /* AddMissionLabel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddMissionLabel.swift; sourceTree = "<group>"; };
3B710A5B2A62D4AB00E95620 /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Settings.bundle; sourceTree = "<group>"; };
3B80B5D42B7F304D00697250 /* adjust+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "adjust+.swift"; sourceTree = "<group>"; };
3B80B5D62B7F30E200697250 /* Numbers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Numbers.swift; sourceTree = "<group>"; };
3B892AB72A2FBBAD00A316BC /* AddMissionService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddMissionService.swift; sourceTree = "<group>"; };
3B892ABA2A2FBD4C00A316BC /* RecommendSituationResponseDTO.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RecommendSituationResponseDTO.swift; sourceTree = "<group>"; };
3B892ABD2A2FBDDE00A316BC /* AddMissionAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddMissionAPI.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -705,6 +709,7 @@
3B11740C2A4B574B0033DDF3 /* CALayer+.swift */,
0943A9F82A53239200614761 /* Bundle+.swift */,
3B03D0D72B0F5EF300302872 /* CGSize+.swift */,
3B80B5D42B7F304D00697250 /* adjust+.swift */,
);
path = Extensions;
sourceTree = "<group>";
Expand Down Expand Up @@ -1126,6 +1131,7 @@
isa = PBXGroup;
children = (
6CF4706929A71D71008D145C /* Strings.swift */,
3B80B5D62B7F30E200697250 /* Numbers.swift */,
);
path = Literals;
sourceTree = "<group>";
Expand Down Expand Up @@ -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 */,
Expand Down Expand Up @@ -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 */,
Expand Down Expand Up @@ -1846,4 +1854,4 @@
/* End XCSwiftPackageProductDependency section */
};
rootObject = 3B027A6C299C31B500BEB65C /* Project object */;
}
}
12 changes: 2 additions & 10 deletions iOS-NOTTODO/iOS-NOTTODO/Global/Extensions/CGSize+.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,13 @@ import UIKit

extension CGSize {

func getDeviceWidth() -> CGFloat {
return UIScreen.main.bounds.width
}

func getDeviceHeight() -> CGFloat {
return UIScreen.main.bounds.height
}

/// 아이폰 13 미니(width 375)를 기준으로 레이아웃을 잡고, 기기의 width 사이즈를 곱해 대응 값을 구할 때 사용
func convertByWidthRatio(_ convert: CGFloat) -> CGFloat {
return (convert / 375) * getDeviceWidth()
return (convert / 375) * Numbers.width
}

/// 아이폰 13 미니(height 812)를 기준으로 레이아웃을 잡고, 기기의 height 사이즈를 곱해 대응 값을 구할 때 사용
func convertByHeightRatio(_ convert: CGFloat) -> CGFloat {
return (convert / 812) * getDeviceHeight()
return (convert / 812) * Numbers.height
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion iOS-NOTTODO/iOS-NOTTODO/Global/Extensions/UIScreen+.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ import UIKit

extension UIScreen {
var hasNotch: Bool {
return !( (UIScreen.main.bounds.width / UIScreen.main.bounds.height) > 0.5 )
return !( (Numbers.width / Numbers.height) > 0.5 )
}
}
12 changes: 2 additions & 10 deletions iOS-NOTTODO/iOS-NOTTODO/Global/Extensions/UIViewController+.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,19 @@ import UIKit
import SnapKit

extension UIViewController {
func getDeviceWidth() -> CGFloat {
return UIScreen.main.bounds.width
}

func getDeviceHeight() -> CGFloat {
return UIScreen.main.bounds.height
}

/// Constraint 설정 시 노치 유무로 기기를 대응하는 상황에서 사용
func constraintByNotch(_ hasNotch: CGFloat, _ noNotch: CGFloat) -> CGFloat {
return UIScreen.main.hasNotch ? hasNotch : noNotch
}

/// 아이폰 13 미니(width 375)를 기준으로 레이아웃을 잡고, 기기의 width 사이즈를 곱해 대응 값을 구할 때 사용
func convertByWidthRatio(_ convert: CGFloat) -> CGFloat {
return (convert / 375) * getDeviceWidth()
return (convert / 375) * Numbers.width
}

/// 아이폰 13 미니(height 812)를 기준으로 레이아웃을 잡고, 기기의 height 사이즈를 곱해 대응 값을 구할 때 사용
func convertByHeightRatio(_ convert: CGFloat) -> CGFloat {
return (convert / 812) * getDeviceHeight()
return (convert / 812) * Numbers.height
}

func changeRootViewController(_ viewControllerToPresent: UIViewController) {
Expand Down
29 changes: 29 additions & 0 deletions iOS-NOTTODO/iOS-NOTTODO/Global/Extensions/adjust+.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//
// adjust+.swift
// iOS-NOTTODO
//
// Created by 강윤서 on 2/16/24.
//

import UIKit

extension CGFloat {
var adjusted: CGFloat {
let ratio: CGFloat = Numbers.width / 375
return ratio * CGFloat(self)
}
}

extension Int {
var adjusted: CGFloat {
let ratio: CGFloat = (Numbers.width) / 375
return ratio * CGFloat(self)
}
}

extension Double {
var adjusted: CGFloat {
let ratio: CGFloat = (Numbers.width) / 375
return ratio * CGFloat(self)
}
}
13 changes: 13 additions & 0 deletions iOS-NOTTODO/iOS-NOTTODO/Global/Literals/Numbers.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// Numbers.swift
// iOS-NOTTODO
//
// Created by 강윤서 on 2/16/24.
//

import UIKit

struct Numbers {
static let width: CGFloat = UIScreen.main.bounds.width
static let height: CGFloat = UIScreen.main.bounds.height
}
2 changes: 1 addition & 1 deletion iOS-NOTTODO/iOS-NOTTODO/Global/Literals/Strings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ struct I18N {
/// Achievement

static let achievement = "성취"
static let total = "<매달 낫투두 성취 공유하고 선물받자!>\n인스타 @nottodo_official을 확인해주세요 :)"
static let total = "남겨주신 피드백으로\n새로운 기능을 업데이트 할 예정이에요 :)"

/// Detail

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ extension StatisticsView {
private func setUI() {

totalImage.do {
$0.image = .icSNS
$0.image = .icFeedback
}

titleLabel.do {
Expand All @@ -54,13 +54,13 @@ extension StatisticsView {
addSubviews(totalImage, titleLabel)

totalImage.snp.makeConstraints {
$0.top.equalToSuperview().offset(69)
$0.top.equalToSuperview().offset(18.adjusted)
$0.centerX.equalToSuperview()
$0.size.equalTo(CGSize(width: 63, height: 51))
$0.size.equalTo(127.adjusted)
}

titleLabel.snp.makeConstraints {
$0.top.equalTo(totalImage.snp.bottom).offset(26)
$0.top.equalTo(totalImage.snp.bottom).offset(6.adjusted)
$0.centerX.equalToSuperview()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

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

Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "ic_feedback.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.