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

Toast Message 구현 [SwiftUI] #161

Merged
merged 6 commits into from
Jul 2, 2024
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
36 changes: 36 additions & 0 deletions Project_Timer.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,13 @@
93B08528248DDF2F00E215BD /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 93B08526248DDF2F00E215BD /* Main.storyboard */; };
93B0852D248DDF3000E215BD /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 93B0852B248DDF3000E215BD /* LaunchScreen.storyboard */; };
93C1358A2539540F00707258 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 93B08529248DDF3000E215BD /* Assets.xcassets */; };
D9A5F1422C32FA3700CED4B0 /* ToastPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9A5F1412C32FA3700CED4B0 /* ToastPresenter.swift */; };
D9A5F14A2C33043F00CED4B0 /* Pretendard-Medium.otf in Resources */ = {isa = PBXBuildFile; fileRef = D9A5F1492C33043F00CED4B0 /* Pretendard-Medium.otf */; };
D9A5F14C2C33044A00CED4B0 /* Pretendard-SemiBold.otf in Resources */ = {isa = PBXBuildFile; fileRef = D9A5F14B2C33044A00CED4B0 /* Pretendard-SemiBold.otf */; };
D9DC51C52C243E37009A96F6 /* newRecordLottie.json in Resources */ = {isa = PBXBuildFile; fileRef = D9DC51C42C243E37009A96F6 /* newRecordLottie.json */; };
D9DC51CF2C26FC83009A96F6 /* newRecordToastView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9DC51CE2C26FC83009A96F6 /* newRecordToastView.swift */; };
D9DC51FF2C29A29F009A96F6 /* ToastView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9DC51FE2C29A29F009A96F6 /* ToastView.swift */; };
D9DC52032C2D9F20009A96F6 /* ToastMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9DC52022C2D9F20009A96F6 /* ToastMessage.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -810,6 +817,13 @@
93B0852E248DDF3000E215BD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
93B08534248DEEBA00E215BD /* Project_Timer.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Project_Timer.entitlements; sourceTree = "<group>"; };
A9F348000F0D4026C9EBB793 /* Pods-Project_Timer.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Project_Timer.debug.xcconfig"; path = "Target Support Files/Pods-Project_Timer/Pods-Project_Timer.debug.xcconfig"; sourceTree = "<group>"; };
D9A5F1412C32FA3700CED4B0 /* ToastPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ToastPresenter.swift; sourceTree = "<group>"; };
D9A5F1492C33043F00CED4B0 /* Pretendard-Medium.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Pretendard-Medium.otf"; sourceTree = "<group>"; };
D9A5F14B2C33044A00CED4B0 /* Pretendard-SemiBold.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Pretendard-SemiBold.otf"; sourceTree = "<group>"; };
D9DC51C42C243E37009A96F6 /* newRecordLottie.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = newRecordLottie.json; sourceTree = "<group>"; };
D9DC51CE2C26FC83009A96F6 /* newRecordToastView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = newRecordToastView.swift; sourceTree = "<group>"; };
D9DC51FE2C29A29F009A96F6 /* ToastView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ToastView.swift; sourceTree = "<group>"; };
D9DC52022C2D9F20009A96F6 /* ToastMessage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ToastMessage.swift; sourceTree = "<group>"; };
EF0BDFDFBC511E7A47A45D16 /* Pods-Project_Timer.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Project_Timer.release.xcconfig"; path = "Target Support Files/Pods-Project_Timer/Pods-Project_Timer.release.xcconfig"; sourceTree = "<group>"; };
F426A4BDC73F07A7F14D3249 /* Pods-Project_Timer.develop.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Project_Timer.develop.xcconfig"; path = "Target Support Files/Pods-Project_Timer/Pods-Project_Timer.develop.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
Expand Down Expand Up @@ -1099,6 +1113,8 @@
87906C7E2B9BF749000EC960 /* MiSans-Normal.ttf */,
87906C802B9BF759000EC960 /* MiSans-Semibold.ttf */,
87306D692B26CC7A001B7C14 /* MiSans-Bold.ttf */,
D9A5F1492C33043F00CED4B0 /* Pretendard-Medium.otf */,
D9A5F14B2C33044A00CED4B0 /* Pretendard-SemiBold.otf */,
878B507125B6E31600B9EFD7 /* timer.mp3 */,
87D4DCEC2BA6B11B00BB5AAB /* Lottie */,
);
Expand Down Expand Up @@ -1213,6 +1229,7 @@
87E6004928426EA3008D17B9 /* Setting */,
87862E852B2D9F8D004ED313 /* Notification */,
875FAE332B1C717E008F19D2 /* Interface */,
D9DC51C62C243EC4009A96F6 /* ToastMessage */,
);
path = Present;
sourceTree = "<group>";
Expand Down Expand Up @@ -1712,6 +1729,7 @@
87D4DCEC2BA6B11B00BB5AAB /* Lottie */ = {
isa = PBXGroup;
children = (
D9DC51C42C243E37009A96F6 /* newRecordLottie.json */,
87D4DCED2BA6B13100BB5AAB /* successBlueLottie.json */,
);
path = Lottie;
Expand Down Expand Up @@ -2006,6 +2024,17 @@
path = Pods;
sourceTree = "<group>";
};
D9DC51C62C243EC4009A96F6 /* ToastMessage */ = {
isa = PBXGroup;
children = (
D9DC52022C2D9F20009A96F6 /* ToastMessage.swift */,
D9DC51CE2C26FC83009A96F6 /* newRecordToastView.swift */,
D9DC51FE2C29A29F009A96F6 /* ToastView.swift */,
D9A5F1412C32FA3700CED4B0 /* ToastPresenter.swift */,
);
path = ToastMessage;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -2120,6 +2149,7 @@
87F50A17298FA3BD00ABF0CF /* newFeatures.strings in Resources */,
8760FB0D2A1DBBAB0068CEF5 /* LocalizableForWidget.strings in Resources */,
87D3CF03288BA6A500ED33B7 /* ProgressDailyTaskCell.xib in Resources */,
D9A5F14A2C33043F00CED4B0 /* Pretendard-Medium.otf in Resources */,
048D8AD128AABC9F00A2456D /* AddNewTaskHistoryCell.xib in Resources */,
048D8AC728AA1B7700A2456D /* AddHistoryCell.xib in Resources */,
878B507225B6E31600B9EFD7 /* timer.mp3 in Resources */,
Expand All @@ -2131,6 +2161,7 @@
93B0852D248DDF3000E215BD /* LaunchScreen.storyboard in Resources */,
04E0DFC828A9191A004DABBE /* HistoryCell.xib in Resources */,
87199F4F2883CCDB0017D01A /* StandardDailyTaskCell.xib in Resources */,
D9A5F14C2C33044A00CED4B0 /* Pretendard-SemiBold.otf in Resources */,
8771190D28954B4A00F53FAD /* StandardWeekTaskCell.xib in Resources */,
87D4DCEE2BA6B13100BB5AAB /* successBlueLottie.json in Resources */,
87906C812B9BF759000EC960 /* MiSans-Semibold.ttf in Resources */,
Expand All @@ -2139,6 +2170,7 @@
874B9D1B25CAB233006FCD04 /* HGGGOTHICSSI_PRO_80G.otf in Resources */,
93C1358A2539540F00707258 /* Assets.xcassets in Resources */,
874B9D1A25CAB233006FCD04 /* HGGGOTHICSSI_PRO_60G.otf in Resources */,
D9DC51C52C243E37009A96F6 /* newRecordLottie.json in Resources */,
93B08528248DDF2F00E215BD /* Main.storyboard in Resources */,
87306D792B26CC7B001B7C14 /* MiSans-Bold.ttf in Resources */,
);
Expand Down Expand Up @@ -2249,12 +2281,14 @@
87910821283875C0005D7B10 /* NetworkController.swift in Sources */,
878BF7ED2955E5430044C079 /* SyncDailysVM.swift in Sources */,
870C70732AD51BEB00024CAC /* PredicateChecker.swift in Sources */,
D9DC51FF2C29A29F009A96F6 /* ToastView.swift in Sources */,
879BE3242AC42758007AAC46 /* TiTiImage.swift in Sources */,
8708008D2B2D63D300830B39 /* SyncLogUseCase.swift in Sources */,
87EA022F2B9BF927003439F2 /* UIViewControllerPreview.swift in Sources */,
87EA02312B9BF941003439F2 /* UIViewPreview.swift in Sources */,
873C197A28D04B5B00E02ADC /* DayOfWeekText.swift in Sources */,
870800852B2D593400830B39 /* SyncLogAPI.swift in Sources */,
D9DC52032C2D9F20009A96F6 /* ToastMessage.swift in Sources */,
87163DCA2ACAF89B008D4072 /* NetworkResult.swift in Sources */,
874F9C2B2ABFF51700675A86 /* SigninSelectView.swift in Sources */,
871C1A0328519CC200BDAE02 /* SettingDevInfoCell.swift in Sources */,
Expand Down Expand Up @@ -2394,6 +2428,7 @@
87BF666C28F80EA500CD6F19 /* NormalTimeLabelVM.swift in Sources */,
87A8CD292AF0C5CB00D4C1D7 /* OverlayRemoveButtonForTextFieldView.swift in Sources */,
8751C6F628472133007FAFC4 /* SettingCellInfo.swift in Sources */,
D9DC51CF2C26FC83009A96F6 /* newRecordToastView.swift in Sources */,
87D4DCC72BA52F3800BB5AAB /* ResetPasswordInfo.swift in Sources */,
8750082D2905998200E27B4A /* TargetTimeSettingPopupVC.swift in Sources */,
8760FCB929541BE3000BCCD1 /* KeyChain.swift in Sources */,
Expand Down Expand Up @@ -2549,6 +2584,7 @@
87DE1177268AC9AD0012F043 /* DailyManager.swift in Sources */,
8708007F2B2D543500830B39 /* RecordTimesUseCase.swift in Sources */,
8708005F2B2C5F5F00830B39 /* AuthDTO.swift in Sources */,
D9A5F1422C32FA3700CED4B0 /* ToastPresenter.swift in Sources */,
875FAE2A2B1C6829008F19D2 /* AppLatestVersionDTO.swift in Sources */,
8721C6D72969123E00410D57 /* IOUsecase.swift in Sources */,
);
Expand Down
38 changes: 38 additions & 0 deletions Project_Timer/Assets.xcassets/ttPrimary.colorset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xFF",
"green" : "0x7A",
"red" : "0x00"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xFF",
"green" : "0x7A",
"red" : "0x00"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
2 changes: 2 additions & 0 deletions Project_Timer/Core/Design System/Theme/Colors.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,6 @@ enum Colors {
static let placeholderGray = UIColor(named: "placeholderGrayColor")!
static let firstBackground = UIColor(named: "firstBackgroundColor")!
static let wrongTextField = UIColor(named: "wrongTextFieldColor")!

static let ttPrimary = UIColor(named: "primary")!
Copy link
Member

Choose a reason for hiding this comment

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

P1 (꼭 확인)
Figma 상에서 앞으로 관리되는 컬러값은 프로퍼티명이 동일했으면 좋겠습니다!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

primary는 iOS에서 제공하는 기본 컬러값이 있기 때문에 tt를 prefix로 붙였습니다
이 부분을 통일하려면 디자인 쪽에서 수정하는게 좋을것 같습니다! 회의때 얘기해보시죵

}
12 changes: 12 additions & 0 deletions Project_Timer/Core/Design System/Theme/Fonts.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ enum Fonts {
static func MiSansBold(size: CGFloat) -> Font {
return Font.custom("MiSans-Bold", size: size)
}
static func PretendardMedium(size: CGFloat) -> Font {
return .custom("Pretendard-Medium", size: size)
}
static func PretendardSemiBold(size: CGFloat) -> Font {
return .custom("Pretendard-SemiBold", size: size)
}
}

// MARK: UIFont
Expand Down Expand Up @@ -63,4 +69,10 @@ extension Fonts {
static func MiSansBold(size: CGFloat) -> UIFont? {
return UIFont(name: "MiSans-Bold", size: size)
}
static func PretendardMedium(size: CGFloat) -> UIFont? {
return UIFont(name: "Pretendard-Medium", size: size)
}
static func PretendardSemiBold(size: CGFloat) -> UIFont? {
return UIFont(name: "Pretendard-SemiBold", size: size)
}
}
2 changes: 2 additions & 0 deletions Project_Timer/Core/Localize/TLRen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ struct TLRen {
case .Widget_Text_SampleTask3: value = "Coding"
case .Widget_Text_SampleTask4: value = "Study"
case .Widget_Text_SampleTask5: value = "Workout"

case .Toast_Text_NewRecord: value = "Start Recording!"
sladuf marked this conversation as resolved.
Show resolved Hide resolved
}

if let op = op, value.contains("{}") {
Expand Down
3 changes: 3 additions & 0 deletions Project_Timer/Core/Localize/TLRkey.swift
Original file line number Diff line number Diff line change
Expand Up @@ -484,4 +484,7 @@ enum TLRkey: String {
case Widget_Text_SampleTask4
/// 탐구
case Widget_Text_SampleTask5

/// Toast Message: 기록 시작!
case Toast_Text_NewRecord
Comment on lines +488 to +489
Copy link
Member

Choose a reason for hiding this comment

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

P3 (반영 고민)
TLRKey 의 주석은 한글로 어떤값인지를 나타내고 있었어요!
기존 방식이라면 "기록 시작!" 내용이여야 합니다
확인이 필요할 것 같아요!

}
2 changes: 2 additions & 0 deletions Project_Timer/Core/Localize/TLRko.swift
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ struct TLRko {
case .Widget_Text_SampleTask3: value = "영어"
case .Widget_Text_SampleTask4: value = "한국사"
case .Widget_Text_SampleTask5: value = "탐구"

case .Toast_Text_NewRecord: value = "기록 시작!"
}

if let op = op, value.contains("{}") {
Expand Down
2 changes: 2 additions & 0 deletions Project_Timer/Core/Localize/TLRzh.swift
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ struct TLRzh {
case .Widget_Text_SampleTask3: value = "物理"
case .Widget_Text_SampleTask4: value = "化学"
case .Widget_Text_SampleTask5: value = "生物"

case .Toast_Text_NewRecord: value = "开始录制!"
}

if let op = op, value.contains("{}") {
Expand Down
Loading