diff --git a/Projects/CommonUI/CommonUI.xcodeproj/project.pbxproj b/Projects/CommonUI/CommonUI.xcodeproj/project.pbxproj index f8af5b8..51c3591 100644 --- a/Projects/CommonUI/CommonUI.xcodeproj/project.pbxproj +++ b/Projects/CommonUI/CommonUI.xcodeproj/project.pbxproj @@ -3,11 +3,14 @@ archiveVersion = 1; classes = { }; - objectVersion = 55; + objectVersion = 56; objects = { /* Begin PBXBuildFile section */ 473C96577A92DD6F71241A76 /* MyPageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9266801EFBA6178C5B70C641 /* MyPageView.swift */; }; + 959AFCDA2E1CF75A006F9875 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 959AFCD92E1CF75A006F9875 /* Images.xcassets */; }; + 959AFCDC2E1D0271006F9875 /* Colors.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 959AFCDB2E1D0271006F9875 /* Colors.xcassets */; }; + 959AFCDF2E1D3F01006F9875 /* HomeProgressView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 959AFCDE2E1D3EF7006F9875 /* HomeProgressView.swift */; }; BE81B1F3E60D37D75A058D2B /* SnapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9CCDC15081A22BAED6318E3E /* SnapKit.framework */; }; C9831384B25F6DE9A630F6FC /* HomeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD69BB6AD88A246EE5D437C3 /* HomeView.swift */; }; E055AA66777B1D4CC8C884E4 /* CommonUIAssets.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EF1CA00DA4B6E64F0CB1F0 /* CommonUIAssets.swift */; }; @@ -36,6 +39,9 @@ 3EBDD10D8389EBB23B42C54F /* ChatView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatView.swift; sourceTree = ""; }; 75EF1CA00DA4B6E64F0CB1F0 /* CommonUIAssets.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommonUIAssets.swift; sourceTree = ""; }; 9266801EFBA6178C5B70C641 /* MyPageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyPageView.swift; sourceTree = ""; }; + 959AFCD92E1CF75A006F9875 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; + 959AFCDB2E1D0271006F9875 /* Colors.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Colors.xcassets; sourceTree = ""; }; + 959AFCDE2E1D3EF7006F9875 /* HomeProgressView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeProgressView.swift; sourceTree = ""; }; 9CCDC15081A22BAED6318E3E /* SnapKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SnapKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; C28FE6392E1612667826E5C5 /* DiaryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DiaryView.swift; sourceTree = ""; }; CDBD62030B65AE3A6A7F34D6 /* CommonUI-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = "CommonUI-Info.plist"; sourceTree = ""; }; @@ -96,12 +102,30 @@ path = Base; sourceTree = ""; }; + 959AFCD82E1CF73B006F9875 /* Assets */ = { + isa = PBXGroup; + children = ( + 959AFCD92E1CF75A006F9875 /* Images.xcassets */, + 959AFCDB2E1D0271006F9875 /* Colors.xcassets */, + ); + path = Assets; + sourceTree = ""; + }; + 959AFCDD2E1D0600006F9875 /* Home */ = { + isa = PBXGroup; + children = ( + DD69BB6AD88A246EE5D437C3 /* HomeView.swift */, + 959AFCDE2E1D3EF7006F9875 /* HomeProgressView.swift */, + ); + path = Home; + sourceTree = ""; + }; 9786E1056828B1E6D5EDAB7C /* View */ = { isa = PBXGroup; children = ( + 959AFCDD2E1D0600006F9875 /* Home */, 3EBDD10D8389EBB23B42C54F /* ChatView.swift */, C28FE6392E1612667826E5C5 /* DiaryView.swift */, - DD69BB6AD88A246EE5D437C3 /* HomeView.swift */, 9266801EFBA6178C5B70C641 /* MyPageView.swift */, ); path = View; @@ -118,6 +142,7 @@ BADD047B94176A526A5B7FB2 /* Sources */ = { isa = PBXGroup; children = ( + 959AFCD82E1CF73B006F9875 /* Assets */, 88FA467F361B11350139B775 /* Base */, 532B9EC7299244FE28190921 /* Coordinator */, 2DBBCE824C7AA1459F0CEA0F /* Enum */, @@ -173,8 +198,6 @@ isa = PBXProject; attributes = { BuildIndependentTargetsInParallel = YES; - TargetAttributes = { - }; }; buildConfigurationList = 26B57D5F96290632B0503228 /* Build configuration list for PBXProject "CommonUI" */; compatibilityVersion = "Xcode 14.0"; @@ -199,6 +222,8 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 959AFCDA2E1CF75A006F9875 /* Images.xcassets in Resources */, + 959AFCDC2E1D0271006F9875 /* Colors.xcassets in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -211,6 +236,7 @@ files = ( F3DA12FF4D18AE405F2F6B08 /* BaseViewController.swift in Sources */, E0865F2849CCB89CC83D3B77 /* Coordinator.swift in Sources */, + 959AFCDF2E1D3F01006F9875 /* HomeProgressView.swift in Sources */, E055AA66777B1D4CC8C884E4 /* CommonUIAssets.swift in Sources */, F7673E4248628D67F3542848 /* ChatView.swift in Sources */, FB3FE0AB8AE6868B6D5E241C /* DiaryView.swift in Sources */, @@ -330,10 +356,7 @@ SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES; SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = ( - "$(inherited)", - DEBUG, - ); + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG"; SWIFT_COMPILATION_MODE = singlefile; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; diff --git a/Projects/CommonUI/Project.swift b/Projects/CommonUI/Project.swift index 22da6d0..fdc122b 100644 --- a/Projects/CommonUI/Project.swift +++ b/Projects/CommonUI/Project.swift @@ -10,6 +10,7 @@ let project = Project( bundleId: "io.tuist.CommonUI", sources: ["Sources/**"], dependencies: [ + .project(target: "Domain", path: "../Domain"), .external(name: "SnapKit") ] ) diff --git a/Projects/CommonUI/Sources/Assets/Colors.xcassets/Contents.json b/Projects/CommonUI/Sources/Assets/Colors.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Projects/CommonUI/Sources/Assets/Colors.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Projects/CommonUI/Sources/Assets/Colors.xcassets/LMGrayColor/Contents.json b/Projects/CommonUI/Sources/Assets/Colors.xcassets/LMGrayColor/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Projects/CommonUI/Sources/Assets/Colors.xcassets/LMGrayColor/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Projects/CommonUI/Sources/Assets/Colors.xcassets/LMGrayColor/LMBlack.colorset/Contents.json b/Projects/CommonUI/Sources/Assets/Colors.xcassets/LMGrayColor/LMBlack.colorset/Contents.json new file mode 100644 index 0000000..be9d677 --- /dev/null +++ b/Projects/CommonUI/Sources/Assets/Colors.xcassets/LMGrayColor/LMBlack.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x00", + "green" : "0x00", + "red" : "0x00" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x00", + "green" : "0x00", + "red" : "0x00" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Projects/CommonUI/Sources/Assets/Colors.xcassets/LMGrayColor/LMGray01.colorset/Contents.json b/Projects/CommonUI/Sources/Assets/Colors.xcassets/LMGrayColor/LMGray01.colorset/Contents.json new file mode 100644 index 0000000..086a73a --- /dev/null +++ b/Projects/CommonUI/Sources/Assets/Colors.xcassets/LMGrayColor/LMGray01.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x49", + "green" : "0x3C", + "red" : "0x35" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x49", + "green" : "0x3C", + "red" : "0x35" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Projects/CommonUI/Sources/Assets/Colors.xcassets/LMGrayColor/LMGray05.colorset/Contents.json b/Projects/CommonUI/Sources/Assets/Colors.xcassets/LMGrayColor/LMGray05.colorset/Contents.json new file mode 100644 index 0000000..016f6f5 --- /dev/null +++ b/Projects/CommonUI/Sources/Assets/Colors.xcassets/LMGrayColor/LMGray05.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xD1", + "green" : "0xD1", + "red" : "0xD1" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xD1", + "green" : "0xD1", + "red" : "0xD1" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Projects/CommonUI/Sources/Assets/Colors.xcassets/LMGrayColor/LMWhite.colorset/Contents.json b/Projects/CommonUI/Sources/Assets/Colors.xcassets/LMGrayColor/LMWhite.colorset/Contents.json new file mode 100644 index 0000000..951b907 --- /dev/null +++ b/Projects/CommonUI/Sources/Assets/Colors.xcassets/LMGrayColor/LMWhite.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0xFF", + "red" : "0xFE" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0xFF", + "red" : "0xFE" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Projects/CommonUI/Sources/Assets/Colors.xcassets/LMPointColor/Contents.json b/Projects/CommonUI/Sources/Assets/Colors.xcassets/LMPointColor/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Projects/CommonUI/Sources/Assets/Colors.xcassets/LMPointColor/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Projects/CommonUI/Sources/Assets/Colors.xcassets/LMPointColor/LMOrange01.colorset/Contents.json b/Projects/CommonUI/Sources/Assets/Colors.xcassets/LMPointColor/LMOrange01.colorset/Contents.json new file mode 100644 index 0000000..4675043 --- /dev/null +++ b/Projects/CommonUI/Sources/Assets/Colors.xcassets/LMPointColor/LMOrange01.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x72", + "green" : "0xB8", + "red" : "0xFF" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x72", + "green" : "0xB8", + "red" : "0xFF" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Projects/CommonUI/Sources/Assets/Colors.xcassets/LMPointColor/LMOrange03.colorset/Contents.json b/Projects/CommonUI/Sources/Assets/Colors.xcassets/LMPointColor/LMOrange03.colorset/Contents.json new file mode 100644 index 0000000..27bd7e8 --- /dev/null +++ b/Projects/CommonUI/Sources/Assets/Colors.xcassets/LMPointColor/LMOrange03.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xBD", + "green" : "0xDE", + "red" : "0xFF" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xBD", + "green" : "0xDE", + "red" : "0xFF" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Projects/CommonUI/Sources/Assets/Colors.xcassets/LMPointColor/LMOrange04.colorset/Contents.json b/Projects/CommonUI/Sources/Assets/Colors.xcassets/LMPointColor/LMOrange04.colorset/Contents.json new file mode 100644 index 0000000..2120c23 --- /dev/null +++ b/Projects/CommonUI/Sources/Assets/Colors.xcassets/LMPointColor/LMOrange04.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xED", + "green" : "0xF6", + "red" : "0xFF" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xED", + "green" : "0xF6", + "red" : "0xFF" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Projects/CommonUI/Sources/Assets/Images.xcassets/Contents.json b/Projects/CommonUI/Sources/Assets/Images.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Projects/CommonUI/Sources/Assets/Images.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Projects/CommonUI/Sources/Assets/Images.xcassets/Logo/Contents.json b/Projects/CommonUI/Sources/Assets/Images.xcassets/Logo/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Projects/CommonUI/Sources/Assets/Images.xcassets/Logo/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Projects/CommonUI/Sources/Assets/Images.xcassets/Logo/small_logo.imageset/Contents.json b/Projects/CommonUI/Sources/Assets/Images.xcassets/Logo/small_logo.imageset/Contents.json new file mode 100644 index 0000000..794dacc --- /dev/null +++ b/Projects/CommonUI/Sources/Assets/Images.xcassets/Logo/small_logo.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "small_logo@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "small_logo@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Projects/CommonUI/Sources/Assets/Images.xcassets/Logo/small_logo.imageset/small_logo@2x.png b/Projects/CommonUI/Sources/Assets/Images.xcassets/Logo/small_logo.imageset/small_logo@2x.png new file mode 100644 index 0000000..8a01423 Binary files /dev/null and b/Projects/CommonUI/Sources/Assets/Images.xcassets/Logo/small_logo.imageset/small_logo@2x.png differ diff --git a/Projects/CommonUI/Sources/Assets/Images.xcassets/Logo/small_logo.imageset/small_logo@3x.png b/Projects/CommonUI/Sources/Assets/Images.xcassets/Logo/small_logo.imageset/small_logo@3x.png new file mode 100644 index 0000000..f1b5cf6 Binary files /dev/null and b/Projects/CommonUI/Sources/Assets/Images.xcassets/Logo/small_logo.imageset/small_logo@3x.png differ diff --git a/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/Contents.json b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_chat.imageset/Contents.json b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_chat.imageset/Contents.json new file mode 100644 index 0000000..c1fede9 --- /dev/null +++ b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_chat.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "tab_icon_chat@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "tab_icon_chat@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_chat.imageset/tab_icon_chat@2x.png b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_chat.imageset/tab_icon_chat@2x.png new file mode 100644 index 0000000..227ef39 Binary files /dev/null and b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_chat.imageset/tab_icon_chat@2x.png differ diff --git a/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_chat.imageset/tab_icon_chat@3x.png b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_chat.imageset/tab_icon_chat@3x.png new file mode 100644 index 0000000..d359fd3 Binary files /dev/null and b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_chat.imageset/tab_icon_chat@3x.png differ diff --git a/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_chat_selected.imageset/Contents.json b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_chat_selected.imageset/Contents.json new file mode 100644 index 0000000..3c3f11c --- /dev/null +++ b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_chat_selected.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "tab_icon_chat_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "tab_icon_chat_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_chat_selected.imageset/tab_icon_chat_selected@2x.png b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_chat_selected.imageset/tab_icon_chat_selected@2x.png new file mode 100644 index 0000000..7da8db7 Binary files /dev/null and b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_chat_selected.imageset/tab_icon_chat_selected@2x.png differ diff --git a/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_chat_selected.imageset/tab_icon_chat_selected@3x.png b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_chat_selected.imageset/tab_icon_chat_selected@3x.png new file mode 100644 index 0000000..35093fa Binary files /dev/null and b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_chat_selected.imageset/tab_icon_chat_selected@3x.png differ diff --git a/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_diary.imageset/Contents.json b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_diary.imageset/Contents.json new file mode 100644 index 0000000..92ace56 --- /dev/null +++ b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_diary.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "tab_icon_diary@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "tab_icon_diary@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_diary.imageset/tab_icon_diary@2x.png b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_diary.imageset/tab_icon_diary@2x.png new file mode 100644 index 0000000..bd449b7 Binary files /dev/null and b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_diary.imageset/tab_icon_diary@2x.png differ diff --git a/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_diary.imageset/tab_icon_diary@3x.png b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_diary.imageset/tab_icon_diary@3x.png new file mode 100644 index 0000000..4f9cd23 Binary files /dev/null and b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_diary.imageset/tab_icon_diary@3x.png differ diff --git a/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_diary_selected.imageset/Contents.json b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_diary_selected.imageset/Contents.json new file mode 100644 index 0000000..2f0a942 --- /dev/null +++ b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_diary_selected.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "tab_icon_diary_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "tab_icon_diary_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_diary_selected.imageset/tab_icon_diary_selected@2x.png b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_diary_selected.imageset/tab_icon_diary_selected@2x.png new file mode 100644 index 0000000..05d8e61 Binary files /dev/null and b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_diary_selected.imageset/tab_icon_diary_selected@2x.png differ diff --git a/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_diary_selected.imageset/tab_icon_diary_selected@3x.png b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_diary_selected.imageset/tab_icon_diary_selected@3x.png new file mode 100644 index 0000000..d955b97 Binary files /dev/null and b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_diary_selected.imageset/tab_icon_diary_selected@3x.png differ diff --git a/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_home.imageset/Contents.json b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_home.imageset/Contents.json new file mode 100644 index 0000000..23490ff --- /dev/null +++ b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_home.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "tab_icon_home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "tab_icon_home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_home.imageset/tab_icon_home@2x.png b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_home.imageset/tab_icon_home@2x.png new file mode 100644 index 0000000..204c676 Binary files /dev/null and b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_home.imageset/tab_icon_home@2x.png differ diff --git a/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_home.imageset/tab_icon_home@3x.png b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_home.imageset/tab_icon_home@3x.png new file mode 100644 index 0000000..5a18dd1 Binary files /dev/null and b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_home.imageset/tab_icon_home@3x.png differ diff --git a/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_home_selected.imageset/Contents.json b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_home_selected.imageset/Contents.json new file mode 100644 index 0000000..677c43c --- /dev/null +++ b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_home_selected.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "tab_icon_home_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "tab_icon_home_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_home_selected.imageset/tab_icon_home_selected@2x.png b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_home_selected.imageset/tab_icon_home_selected@2x.png new file mode 100644 index 0000000..5d896ee Binary files /dev/null and b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_home_selected.imageset/tab_icon_home_selected@2x.png differ diff --git a/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_home_selected.imageset/tab_icon_home_selected@3x.png b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_home_selected.imageset/tab_icon_home_selected@3x.png new file mode 100644 index 0000000..101144f Binary files /dev/null and b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_home_selected.imageset/tab_icon_home_selected@3x.png differ diff --git a/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_mypage.imageset/Contents.json b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_mypage.imageset/Contents.json new file mode 100644 index 0000000..f505c90 --- /dev/null +++ b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_mypage.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "tab_icon_mypage@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "tab_icon_mypage@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_mypage.imageset/tab_icon_mypage@2x.png b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_mypage.imageset/tab_icon_mypage@2x.png new file mode 100644 index 0000000..b4b0867 Binary files /dev/null and b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_mypage.imageset/tab_icon_mypage@2x.png differ diff --git a/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_mypage.imageset/tab_icon_mypage@3x.png b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_mypage.imageset/tab_icon_mypage@3x.png new file mode 100644 index 0000000..dc644ce Binary files /dev/null and b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_mypage.imageset/tab_icon_mypage@3x.png differ diff --git a/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_mypage_selected.imageset/Contents.json b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_mypage_selected.imageset/Contents.json new file mode 100644 index 0000000..3e69942 --- /dev/null +++ b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_mypage_selected.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "tab_icon_mypage_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "tab_icon_mypage_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_mypage_selected.imageset/tab_icon_mypage_selected@2x.png b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_mypage_selected.imageset/tab_icon_mypage_selected@2x.png new file mode 100644 index 0000000..8ab28d8 Binary files /dev/null and b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_mypage_selected.imageset/tab_icon_mypage_selected@2x.png differ diff --git a/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_mypage_selected.imageset/tab_icon_mypage_selected@3x.png b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_mypage_selected.imageset/tab_icon_mypage_selected@3x.png new file mode 100644 index 0000000..7960f1c Binary files /dev/null and b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_mypage_selected.imageset/tab_icon_mypage_selected@3x.png differ diff --git a/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_stats.imageset/Contents.json b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_stats.imageset/Contents.json new file mode 100644 index 0000000..982580c --- /dev/null +++ b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_stats.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "tab_icon_stats@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "tab_icon_stats@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_stats.imageset/tab_icon_stats@2x.png b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_stats.imageset/tab_icon_stats@2x.png new file mode 100644 index 0000000..a555c6e Binary files /dev/null and b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_stats.imageset/tab_icon_stats@2x.png differ diff --git a/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_stats.imageset/tab_icon_stats@3x.png b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_stats.imageset/tab_icon_stats@3x.png new file mode 100644 index 0000000..1f34fca Binary files /dev/null and b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_stats.imageset/tab_icon_stats@3x.png differ diff --git a/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_stats_selected.imageset/Contents.json b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_stats_selected.imageset/Contents.json new file mode 100644 index 0000000..3143e38 --- /dev/null +++ b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_stats_selected.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "tab_icon_stats_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "tab_icon_stats_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_stats_selected.imageset/tab_icon_stats_selected@2x.png b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_stats_selected.imageset/tab_icon_stats_selected@2x.png new file mode 100644 index 0000000..f0a2d55 Binary files /dev/null and b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_stats_selected.imageset/tab_icon_stats_selected@2x.png differ diff --git a/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_stats_selected.imageset/tab_icon_stats_selected@3x.png b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_stats_selected.imageset/tab_icon_stats_selected@3x.png new file mode 100644 index 0000000..ca72ef4 Binary files /dev/null and b/Projects/CommonUI/Sources/Assets/Images.xcassets/tabIcon/tab_icon_stats_selected.imageset/tab_icon_stats_selected@3x.png differ diff --git a/Projects/CommonUI/Sources/Base/BaseViewController.swift b/Projects/CommonUI/Sources/Base/BaseViewController.swift index ec77d17..f288124 100644 --- a/Projects/CommonUI/Sources/Base/BaseViewController.swift +++ b/Projects/CommonUI/Sources/Base/BaseViewController.swift @@ -4,3 +4,47 @@ // // Created by 박지윤 on 7/1/25. // + +import UIKit +import RxSwift + +public protocol BaseViewItemProtocol: AnyObject { + func setupViewProperty() + func setupHierarchy() + func setupLayout() +} + +public protocol BaseViewControllerProtocol: AnyObject, BaseViewItemProtocol { + func setupDelegate() + func setupBind() +} + +open class BaseViewController: UIViewController, BaseViewControllerProtocol { + public let disposeBag = DisposeBag() + + public init() { + super.init(nibName: nil, bundle: nil) + } + + @available(*, unavailable, message: "remove required init") + public required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + open override func viewDidLoad() { + super.viewDidLoad() + view.backgroundColor = .white + + setupViewProperty() + setupDelegate() + setupHierarchy() + setupLayout() + setupBind() + } + + open func setupViewProperty() { } + open func setupDelegate() { } + open func setupHierarchy() { } + open func setupLayout() { } + open func setupBind() { } +} diff --git a/Projects/CommonUI/Sources/Enum/CommonUIAssets.swift b/Projects/CommonUI/Sources/Enum/CommonUIAssets.swift index 0206363..adada42 100644 --- a/Projects/CommonUI/Sources/Enum/CommonUIAssets.swift +++ b/Projects/CommonUI/Sources/Enum/CommonUIAssets.swift @@ -4,3 +4,48 @@ // // Created by 박지윤 on 7/2/25. // + +import UIKit + +public final class CommonUIBundleHelper {} + +public enum CommonUIAssets { + /// image + /// * tab icon + public static let tabIconHome = image(named: "tab_icon_home") + public static let tabIconHomeSelected = image(named: "tab_icon_home_selected") + public static let tabIconChat = image(named: "tab_icon_chat") + public static let tabIconChatSelected = image(named: "tab_icon_chat_selected") + public static let tabIconDiary = image(named: "tab_icon_diary") + public static let tabIconDiarySelected = image(named: "tab_icon_diary_selected") + public static let tabIconStats = image(named: "tab_icon_stats") + public static let tabIconStatsSelected = image(named: "tab_icon_stats_selected") + public static let tabIconMypage = image(named: "tab_icon_mypage") + public static let tabIconMypageSelected = image(named: "tab_icon_mypage_selected") + + /// * logo + public static let smallLogo = image(named: "small_logo") + + /// color + public static let LMOrange1 = color(named: "LMOrange01") + public static let LMOrange3 = color(named: "LMOrange03") + public static let LMOrange4 = color(named: "LMOrange04") + public static let LMWhite = color(named: "LMWhite") + public static let LMBlack = color(named: "LMBlack") + public static let LMGray1 = color(named: "LMGray01") + public static let LMGray5 = color(named: "LMGray05") +} + +private func image(named name: String) -> UIImage? { + return UIImage(named: name, in: Bundle(for: CommonUIBundleHelper.self), compatibleWith: nil) +} + +private func color(named name: String) -> UIColor? { + return UIColor(named: name, in: Bundle(for: CommonUIBundleHelper.self), compatibleWith: nil) +} + +extension UIImage { + public var original: UIImage { + return self.withRenderingMode(.alwaysOriginal) + } +} diff --git a/Projects/CommonUI/Sources/View/Home/HomeProgressView.swift b/Projects/CommonUI/Sources/View/Home/HomeProgressView.swift new file mode 100644 index 0000000..dfd44e7 --- /dev/null +++ b/Projects/CommonUI/Sources/View/Home/HomeProgressView.swift @@ -0,0 +1,87 @@ +// +// HomeProgressView.swift +// CommonUI +// +// Created by 박지윤 on 7/8/25. +// + +import Domain +import UIKit +import SnapKit +import Then + +open class HomeProgressView: UIView { + var courseLabel = UILabel() + var progressLabel = UILabel() + let progressEntireView = UIView().then { + $0.backgroundColor = CommonUIAssets.LMGray5 + $0.layer.cornerRadius = 5 + } + var progressView = UIView() + var buttonStackView = UIStackView() + var restartButton = UIButton() + var continueButton = UIButton() + + public override init(frame: CGRect) { + super.init(frame: frame) + initAttribute() + initUI() + } + + public func bind(course: CourseVO) { + courseLabel.text = "한국어 훈련 \(course.courseLv ?? 1)단계" + progressLabel.text = "진행률: " + "" + "%" + } + + func initAttribute() { + self.backgroundColor = CommonUIAssets.LMWhite + self.layer.borderColor = CommonUIAssets.LMOrange1?.cgColor + self.layer.borderWidth = 2 + self.layer.cornerRadius = 12 + + courseLabel = courseLabel.then { + $0.text = "한국어 훈련 1단계" + $0.textColor = CommonUIAssets.LMBlack + $0.font = .systemFont(ofSize: 18, weight: .semibold) + } + + progressLabel = progressLabel.then { + $0.text = "진행률: 60%" + $0.textColor = CommonUIAssets.LMGray1 + $0.font = .systemFont(ofSize: 11, weight: .regular) + } + } + + func initUI() { + [restartButton, continueButton] + .forEach { buttonStackView.addSubview($0) } + + [courseLabel, progressLabel, progressEntireView, progressView, buttonStackView] + .forEach { self.addSubview($0) } + + self.snp.makeConstraints { + $0.height.equalTo(151) + $0.width.equalTo(344) + } + + courseLabel.snp.makeConstraints { + $0.top.leading.equalToSuperview().inset(24) + } + + progressLabel.snp.makeConstraints { + $0.top.equalTo(courseLabel.snp.bottom).offset(14) + $0.leading.equalTo(courseLabel.snp.leading) + } + + progressEntireView.snp.makeConstraints { + $0.top.equalTo(progressLabel.snp.bottom).offset(12) + $0.centerX.equalToSuperview() + $0.height.equalTo(6) + $0.width.equalTo(300) + } + } + + required public init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } +} diff --git a/Projects/CommonUI/Sources/View/Home/HomeView.swift b/Projects/CommonUI/Sources/View/Home/HomeView.swift new file mode 100644 index 0000000..61834e1 --- /dev/null +++ b/Projects/CommonUI/Sources/View/Home/HomeView.swift @@ -0,0 +1,103 @@ +// +// HomeView.swift +// CommonUI +// +// Created by 박지윤 on 7/1/25. +// + +import Domain +import UIKit +import SnapKit +import Then + +open class HomeView: UIView { + let logoImageView = UIImageView().then { + $0.image = CommonUIAssets.smallLogo + $0.contentMode = .scaleAspectFit + } + var profileView = UIView() + var titleLabelStackView = UIStackView() + var titleLabel = UILabel() + var subtitleLabel = UILabel() + + public override init(frame: CGRect) { + super.init(frame: frame) + initAttribute() + initUI() + } + + public func bind(course: CourseVO) { + titleLabel.text = "안녕하세요, " + "" + "님!" + } + + func initAttribute() { + self.backgroundColor = .clear + + profileView = profileView.then { + $0.backgroundColor = CommonUIAssets.LMOrange3 + $0.layer.cornerRadius = 28 + } + + titleLabelStackView = titleLabelStackView.then { + $0.axis = .vertical + $0.spacing = 4 + $0.distribution = .fill + } + + titleLabel = titleLabel.then { + $0.text = "안녕하세요, OO님!" + $0.textColor = CommonUIAssets.LMBlack + $0.font = .systemFont(ofSize: 19, weight: .semibold) + } + + subtitleLabel = subtitleLabel.then { + $0.text = "오늘의 학습을 시작해볼까요?" + $0.textColor = CommonUIAssets.LMGray1 + $0.font = .systemFont(ofSize: 13, weight: .regular) + } + } + + func initUI() { + self.snp.makeConstraints { + $0.height.equalTo(228) + } + + [titleLabel, subtitleLabel] + .forEach { titleLabelStackView.addSubview($0) } + + [logoImageView, profileView, titleLabelStackView] + .forEach { self.addSubview($0) } + + logoImageView.snp.makeConstraints { + $0.height.equalTo(34) + $0.width.equalTo(65) + $0.leading.equalTo(self.safeAreaInsets).inset(20) + $0.top.equalTo(self.safeAreaInsets).inset(77) + } + + profileView.snp.makeConstraints { + $0.height.width.equalTo(56) + $0.leading.equalTo(self.safeAreaInsets).inset(24) + $0.top.equalTo(logoImageView.snp.bottom).offset(34) + } + + titleLabelStackView.snp.makeConstraints { + $0.leading.equalTo(profileView.snp.trailing).offset(10) + $0.centerY.equalTo(profileView) + $0.height.equalTo(49) + $0.trailing.equalToSuperview().inset(20) + } + + titleLabel.snp.makeConstraints { + $0.top.equalToSuperview().inset(2) + } + + subtitleLabel.snp.makeConstraints { + $0.bottom.equalToSuperview().inset(2) + } + } + + required public init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } +} diff --git a/Projects/CommonUI/Sources/View/HomeView.swift b/Projects/CommonUI/Sources/View/HomeView.swift deleted file mode 100644 index 4be5ef3..0000000 --- a/Projects/CommonUI/Sources/View/HomeView.swift +++ /dev/null @@ -1,6 +0,0 @@ -// -// HomeView.swift -// CommonUI -// -// Created by 박지윤 on 7/1/25. -// diff --git a/Projects/Home/Sources/View/HomeViewController.swift b/Projects/Home/Sources/View/HomeViewController.swift index 1db6b95..84f59e8 100644 --- a/Projects/Home/Sources/View/HomeViewController.swift +++ b/Projects/Home/Sources/View/HomeViewController.swift @@ -5,22 +5,64 @@ // Created by 박지윤 on 7/1/25. // +import CommonUI import UIKit +import SnapKit +import RxSwift -public class HomeViewController: UIViewController { +public class HomeViewController: BaseViewController { let viewModel: HomeViewModel - + let homeView = HomeView() + let homeProgressView = HomeProgressView() + var courseLabel = UILabel() + public init(homeViewModel: HomeViewModel) { self.viewModel = homeViewModel - super.init(nibName: nil, bundle: nil) + super.init() } - + required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } - + public override func viewDidLoad() { super.viewDidLoad() - view.backgroundColor = .blue + } + + public override func setupViewProperty() { + view.backgroundColor = CommonUIAssets.LMOrange4 + + courseLabel = courseLabel.then { + $0.text = "1단계 퀴즈" + $0.textColor = CommonUIAssets.LMBlack + $0.font = .systemFont(ofSize: 16, weight: .regular) + } + } + + public override func setupHierarchy() { + [homeView, homeProgressView, courseLabel].forEach { view.addSubview($0) } + } + + public override func setupDelegate() { + } + + public override func setupLayout() { + homeView.snp.makeConstraints { + $0.top.horizontalEdges.equalToSuperview() + } + + homeProgressView.snp.makeConstraints { + $0.top.equalTo(homeView.snp.bottom).offset(4) + $0.centerX.equalToSuperview() + } + + courseLabel.snp.makeConstraints { + $0.top.equalTo(homeProgressView.snp.bottom).offset(30) + $0.leading.equalTo(30) + } + } + + public override func setupBind() { +// courseLabel.text = "" + "단계 퀴즈" } } diff --git a/Projects/LearnMate/Derived/InfoPlists/LearnMateTests-Info.plist b/Projects/LearnMate/Derived/InfoPlists/LearnMateTests-Info.plist deleted file mode 100644 index 1eed55f..0000000 --- a/Projects/LearnMate/Derived/InfoPlists/LearnMateTests-Info.plist +++ /dev/null @@ -1,29 +0,0 @@ - - - - - UIApplicationSceneManifest - - UIApplicationSupportsMultipleScenes - - UISceneConfigurations - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/Projects/LearnMate/LearnMate.xcodeproj/project.pbxproj b/Projects/LearnMate/LearnMate.xcodeproj/project.pbxproj index 34bde02..42a5ccb 100644 --- a/Projects/LearnMate/LearnMate.xcodeproj/project.pbxproj +++ b/Projects/LearnMate/LearnMate.xcodeproj/project.pbxproj @@ -101,7 +101,6 @@ 69B232119647519D26142C64 /* Then.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Then.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 7459B5071C1C3E12A6519672 /* Diary.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Diary.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 75AF6F9390E20101F1F4BFB3 /* LearnMate-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = "LearnMate-Info.plist"; sourceTree = ""; }; - 775DFA54CE473464C0AC8D57 /* LearnMateTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = "LearnMateTests-Info.plist"; sourceTree = ""; }; 7C422FE2DDF9127C2F4B2DF0 /* RxSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RxSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 89F58ED76FC4C0973305766F /* DependencyInjector.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DependencyInjector.swift; sourceTree = ""; }; 8A00D2BDD6B9A0B6E62CF3CC /* LearnMateTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LearnMateTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -110,6 +109,7 @@ A4DC536F09A4A8284AA20CE7 /* CommonUI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = CommonUI.framework; sourceTree = BUILT_PRODUCTS_DIR; }; AE77FC6A5C33846C3A0F4938 /* Swinject.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Swinject.framework; sourceTree = BUILT_PRODUCTS_DIR; }; C25294FAE7464C63791082A4 /* MyPageAssembly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyPageAssembly.swift; sourceTree = ""; }; + E7792C9340E2B053D136A839 /* LearnMateTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = "LearnMateTests-Info.plist"; sourceTree = ""; }; EEAA29E105D3AB0BAD502401 /* DomainAssembly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DomainAssembly.swift; sourceTree = ""; }; F39319B32F0C0DD673EA6D68 /* ChatAssembly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatAssembly.swift; sourceTree = ""; }; F59511B963866C713AAADAF5 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -156,30 +156,14 @@ isa = PBXGroup; children = ( 75AF6F9390E20101F1F4BFB3 /* LearnMate-Info.plist */, + E7792C9340E2B053D136A839 /* LearnMateTests-Info.plist */, ); path = Support; sourceTree = ""; }; - 2CE74D9D55F5B62BE83D0A4B /* InfoPlists */ = { - isa = PBXGroup; - children = ( - 775DFA54CE473464C0AC8D57 /* LearnMateTests-Info.plist */, - ); - path = InfoPlists; - sourceTree = ""; - }; - 3A71D5C5E07EF937467BAF41 /* Derived */ = { - isa = PBXGroup; - children = ( - 2CE74D9D55F5B62BE83D0A4B /* InfoPlists */, - ); - path = Derived; - sourceTree = ""; - }; B074F9F8E730729626040CA5 /* Project */ = { isa = PBXGroup; children = ( - 3A71D5C5E07EF937467BAF41 /* Derived */, 02DEB0AB87622688EABA33D7 /* Sources */, 1E95FEDCBD464D7BF64D5488 /* Support */, ); @@ -497,7 +481,7 @@ buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_IDENTITY = "iPhone Developer"; - INFOPLIST_FILE = "Derived/InfoPlists/LearnMateTests-Info.plist"; + INFOPLIST_FILE = "Support/LearnMateTests-Info.plist"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -527,7 +511,7 @@ buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_IDENTITY = "iPhone Developer"; - INFOPLIST_FILE = "Derived/InfoPlists/LearnMateTests-Info.plist"; + INFOPLIST_FILE = "Support/LearnMateTests-Info.plist"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", diff --git a/Projects/LearnMate/Project.swift b/Projects/LearnMate/Project.swift index 63ee577..df7b1ae 100644 --- a/Projects/LearnMate/Project.swift +++ b/Projects/LearnMate/Project.swift @@ -26,7 +26,7 @@ let project = Project( destinations: .iOS, product: .unitTests, bundleId: "io.tuist.LearnMateTests", - infoPlist: .default, + infoPlist: .file(path: "Support/LearnMateTests-Info.plist"), sources: ["Tests/**"], resources: [], dependencies: [.target(name: "LearnMate")] diff --git a/Projects/LearnMate/Sources/Coordinator/AppCoordinator.swift b/Projects/LearnMate/Sources/Coordinator/AppCoordinator.swift index f8223f7..76f0e3f 100644 --- a/Projects/LearnMate/Sources/Coordinator/AppCoordinator.swift +++ b/Projects/LearnMate/Sources/Coordinator/AppCoordinator.swift @@ -34,6 +34,7 @@ final class DefaultAppCoordinator: AppCoordinator{ } func start() { + setNavigationBar() setTabBarCoordinator() showTabbarFlow() } @@ -54,7 +55,11 @@ final class DefaultAppCoordinator: AppCoordinator{ let tabBarCoordinator = DefaultTabBarController(dependency: dependency) childCoordinators.append(tabBarCoordinator) } - + + func setNavigationBar() { + navigationController.setNavigationBarHidden(true, animated: true) + } + /// 앱 코디네이터의 자식 코디네이터 get func getChildCoordinator(_ type: CoordinatorType) -> Coordinator? { var childCoordinator: Coordinator? = nil diff --git a/Projects/LearnMate/Sources/Coordinator/TabBarCoordinator.swift b/Projects/LearnMate/Sources/Coordinator/TabBarCoordinator.swift index 691e3d2..47c28f4 100644 --- a/Projects/LearnMate/Sources/Coordinator/TabBarCoordinator.swift +++ b/Projects/LearnMate/Sources/Coordinator/TabBarCoordinator.swift @@ -56,13 +56,34 @@ final class DefaultTabBarController: TabBarCoordinator { self.tabBarController.selectedIndex = TabBarPage.home.pageOrderNumber() self.tabBarController.view.backgroundColor = .white self.tabBarController.tabBar.backgroundColor = .white - self.tabBarController.tabBar.tintColor = .black + self.tabBarController.tabBar.tintColor = CommonUIAssets.LMOrange1 self.navigationController.pushViewController(self.tabBarController, animated: true) } /// 각 탭바 아이템 설정 private func configureTabBarItem(of page: TabBarPage) -> UITabBarItem { - return UITabBarItem(title: page.rawValue, image: nil, tag: page.pageOrderNumber()) + switch page { + case .home: + return UITabBarItem(title: page.tabIconName(), + image: CommonUIAssets.tabIconHome?.original, + selectedImage: CommonUIAssets.tabIconHomeSelected?.original) + case .chat: + return UITabBarItem(title: page.tabIconName(), + image: CommonUIAssets.tabIconChat?.original, + selectedImage: CommonUIAssets.tabIconChatSelected?.original) + case .diary: + return UITabBarItem(title: page.tabIconName(), + image: CommonUIAssets.tabIconDiary?.original, + selectedImage: CommonUIAssets.tabIconDiarySelected?.original) + case .stats: + return UITabBarItem(title: page.tabIconName(), + image: CommonUIAssets.tabIconStats?.original, + selectedImage: CommonUIAssets.tabIconStatsSelected?.original) + case .myPage: + return UITabBarItem(title: page.tabIconName(), + image: CommonUIAssets.tabIconMypage?.original, + selectedImage: CommonUIAssets.tabIconMypageSelected?.original) + } } /// 각 탭 flow 시작 @@ -93,7 +114,7 @@ enum TabBarPage: String, CaseIterable { default: return nil } } - + func pageOrderNumber() -> Int { switch self { case .home: return 0 @@ -103,8 +124,14 @@ enum TabBarPage: String, CaseIterable { case .myPage: return 4 } } - + func tabIconName() -> String { - return self.rawValue + switch self { + case .home: return "홈" + case .chat: return "대화" + case .diary: return "일기" + case .stats: return "통계" + case .myPage: return "마이페이지" + } } }