From ecbd7c18153cbdca6d06f8dd970179f9ffd8c692 Mon Sep 17 00:00:00 2001 From: parkdoyeon1 Date: Tue, 5 Mar 2024 09:33:28 +0900 Subject: [PATCH 01/12] =?UTF-8?q?=F0=9F=92=84=20::=20Assets=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AccentColor.colorset/Contents.json | 11 --- .../AppIcon.appiconset/Contents.json | 98 ------------------- .../Resources/Assets.xcassets/Contents.json | 6 -- .../chat.imageset/Contents.json | 21 ++++ .../Images.xcassets/chat.imageset/chat.svg | 3 + .../human_plus.imageset/Contents.json | 21 ++++ .../fluent_person-24-filled.svg | 4 + .../store.imageset/Contents.json | 21 ++++ .../Images.xcassets/store.imageset/home.svg | 3 + .../user_profile.imageset/Contents.json | 21 ++++ .../user_profile.imageset/user_profile.svg | 3 + 11 files changed, 97 insertions(+), 115 deletions(-) delete mode 100644 Projects/App/Resources/Assets.xcassets/AccentColor.colorset/Contents.json delete mode 100644 Projects/App/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json delete mode 100644 Projects/App/Resources/Assets.xcassets/Contents.json create mode 100644 Projects/Modules/DesignSystem/Resources/Images/Images.xcassets/chat.imageset/Contents.json create mode 100644 Projects/Modules/DesignSystem/Resources/Images/Images.xcassets/chat.imageset/chat.svg create mode 100644 Projects/Modules/DesignSystem/Resources/Images/Images.xcassets/human_plus.imageset/Contents.json create mode 100644 Projects/Modules/DesignSystem/Resources/Images/Images.xcassets/human_plus.imageset/fluent_person-24-filled.svg create mode 100644 Projects/Modules/DesignSystem/Resources/Images/Images.xcassets/store.imageset/Contents.json create mode 100644 Projects/Modules/DesignSystem/Resources/Images/Images.xcassets/store.imageset/home.svg create mode 100644 Projects/Modules/DesignSystem/Resources/Images/Images.xcassets/user_profile.imageset/Contents.json create mode 100644 Projects/Modules/DesignSystem/Resources/Images/Images.xcassets/user_profile.imageset/user_profile.svg diff --git a/Projects/App/Resources/Assets.xcassets/AccentColor.colorset/Contents.json b/Projects/App/Resources/Assets.xcassets/AccentColor.colorset/Contents.json deleted file mode 100644 index eb87897..0000000 --- a/Projects/App/Resources/Assets.xcassets/AccentColor.colorset/Contents.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "colors" : [ - { - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Projects/App/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json b/Projects/App/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 9221b9b..0000000 --- a/Projects/App/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "20x20" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "20x20" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "29x29" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "29x29" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "40x40" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "40x40" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "60x60" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "60x60" - }, - { - "idiom" : "ipad", - "scale" : "1x", - "size" : "20x20" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "20x20" - }, - { - "idiom" : "ipad", - "scale" : "1x", - "size" : "29x29" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "29x29" - }, - { - "idiom" : "ipad", - "scale" : "1x", - "size" : "40x40" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "40x40" - }, - { - "idiom" : "ipad", - "scale" : "1x", - "size" : "76x76" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "76x76" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "83.5x83.5" - }, - { - "idiom" : "ios-marketing", - "scale" : "1x", - "size" : "1024x1024" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Projects/App/Resources/Assets.xcassets/Contents.json b/Projects/App/Resources/Assets.xcassets/Contents.json deleted file mode 100644 index 73c0059..0000000 --- a/Projects/App/Resources/Assets.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Projects/Modules/DesignSystem/Resources/Images/Images.xcassets/chat.imageset/Contents.json b/Projects/Modules/DesignSystem/Resources/Images/Images.xcassets/chat.imageset/Contents.json new file mode 100644 index 0000000..eb18f67 --- /dev/null +++ b/Projects/Modules/DesignSystem/Resources/Images/Images.xcassets/chat.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "chat.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Projects/Modules/DesignSystem/Resources/Images/Images.xcassets/chat.imageset/chat.svg b/Projects/Modules/DesignSystem/Resources/Images/Images.xcassets/chat.imageset/chat.svg new file mode 100644 index 0000000..9c9505f --- /dev/null +++ b/Projects/Modules/DesignSystem/Resources/Images/Images.xcassets/chat.imageset/chat.svg @@ -0,0 +1,3 @@ + + + diff --git a/Projects/Modules/DesignSystem/Resources/Images/Images.xcassets/human_plus.imageset/Contents.json b/Projects/Modules/DesignSystem/Resources/Images/Images.xcassets/human_plus.imageset/Contents.json new file mode 100644 index 0000000..db70a0e --- /dev/null +++ b/Projects/Modules/DesignSystem/Resources/Images/Images.xcassets/human_plus.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "fluent_person-24-filled.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Projects/Modules/DesignSystem/Resources/Images/Images.xcassets/human_plus.imageset/fluent_person-24-filled.svg b/Projects/Modules/DesignSystem/Resources/Images/Images.xcassets/human_plus.imageset/fluent_person-24-filled.svg new file mode 100644 index 0000000..2282ad5 --- /dev/null +++ b/Projects/Modules/DesignSystem/Resources/Images/Images.xcassets/human_plus.imageset/fluent_person-24-filled.svg @@ -0,0 +1,4 @@ + + + + diff --git a/Projects/Modules/DesignSystem/Resources/Images/Images.xcassets/store.imageset/Contents.json b/Projects/Modules/DesignSystem/Resources/Images/Images.xcassets/store.imageset/Contents.json new file mode 100644 index 0000000..654a69d --- /dev/null +++ b/Projects/Modules/DesignSystem/Resources/Images/Images.xcassets/store.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "home.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Projects/Modules/DesignSystem/Resources/Images/Images.xcassets/store.imageset/home.svg b/Projects/Modules/DesignSystem/Resources/Images/Images.xcassets/store.imageset/home.svg new file mode 100644 index 0000000..958b7ef --- /dev/null +++ b/Projects/Modules/DesignSystem/Resources/Images/Images.xcassets/store.imageset/home.svg @@ -0,0 +1,3 @@ + + + diff --git a/Projects/Modules/DesignSystem/Resources/Images/Images.xcassets/user_profile.imageset/Contents.json b/Projects/Modules/DesignSystem/Resources/Images/Images.xcassets/user_profile.imageset/Contents.json new file mode 100644 index 0000000..fcc5d09 --- /dev/null +++ b/Projects/Modules/DesignSystem/Resources/Images/Images.xcassets/user_profile.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "user_profile.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Projects/Modules/DesignSystem/Resources/Images/Images.xcassets/user_profile.imageset/user_profile.svg b/Projects/Modules/DesignSystem/Resources/Images/Images.xcassets/user_profile.imageset/user_profile.svg new file mode 100644 index 0000000..624e7f2 --- /dev/null +++ b/Projects/Modules/DesignSystem/Resources/Images/Images.xcassets/user_profile.imageset/user_profile.svg @@ -0,0 +1,3 @@ + + + From fefe04b3aa348a7bec72c0636c0ba6d6124fa2f1 Mon Sep 17 00:00:00 2001 From: parkdoyeon1 Date: Tue, 5 Mar 2024 09:34:18 +0900 Subject: [PATCH 02/12] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20::=20Steps?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Projects/Core/Sources/Steps/Tabs/ChatStep.swift | 5 +++++ Projects/Core/Sources/Steps/Tabs/FriendsStep.swift | 5 +++++ Projects/Core/Sources/Steps/Tabs/MyPageStep.swift | 5 +++++ Projects/Core/Sources/Steps/Tabs/StoreStep.swift | 5 +++++ 4 files changed, 20 insertions(+) create mode 100644 Projects/Core/Sources/Steps/Tabs/ChatStep.swift create mode 100644 Projects/Core/Sources/Steps/Tabs/FriendsStep.swift create mode 100644 Projects/Core/Sources/Steps/Tabs/MyPageStep.swift create mode 100644 Projects/Core/Sources/Steps/Tabs/StoreStep.swift diff --git a/Projects/Core/Sources/Steps/Tabs/ChatStep.swift b/Projects/Core/Sources/Steps/Tabs/ChatStep.swift new file mode 100644 index 0000000..8b7b250 --- /dev/null +++ b/Projects/Core/Sources/Steps/Tabs/ChatStep.swift @@ -0,0 +1,5 @@ +import RxFlow + +public enum ChatStep: Step { + case chatIsRequired +} diff --git a/Projects/Core/Sources/Steps/Tabs/FriendsStep.swift b/Projects/Core/Sources/Steps/Tabs/FriendsStep.swift new file mode 100644 index 0000000..25d9e47 --- /dev/null +++ b/Projects/Core/Sources/Steps/Tabs/FriendsStep.swift @@ -0,0 +1,5 @@ +import RxFlow + +public enum FriendsStep: Step { + case friendsIsRequired +} diff --git a/Projects/Core/Sources/Steps/Tabs/MyPageStep.swift b/Projects/Core/Sources/Steps/Tabs/MyPageStep.swift new file mode 100644 index 0000000..5324db2 --- /dev/null +++ b/Projects/Core/Sources/Steps/Tabs/MyPageStep.swift @@ -0,0 +1,5 @@ +import RxFlow + +public enum MyPageStep: Step { + case myPageIsRequired +} diff --git a/Projects/Core/Sources/Steps/Tabs/StoreStep.swift b/Projects/Core/Sources/Steps/Tabs/StoreStep.swift new file mode 100644 index 0000000..0914df4 --- /dev/null +++ b/Projects/Core/Sources/Steps/Tabs/StoreStep.swift @@ -0,0 +1,5 @@ +import RxFlow + +public enum StoreStep: Step { + case storeIsRequired +} From 36f71bef427a7c2827a0cf2bf99d7d3a6113efef Mon Sep 17 00:00:00 2001 From: parkdoyeon1 Date: Tue, 5 Mar 2024 13:29:50 +0900 Subject: [PATCH 03/12] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20::=20Flows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Projects/Flow/Sources/AppFlow.swift | 21 +++-- Projects/Flow/Sources/ChatFlow.swift | 39 +++++++++ Projects/Flow/Sources/FriendsFlow.swift | 40 +++++++++ Projects/Flow/Sources/MyPageFlow.swift | 39 +++++++++ Projects/Flow/Sources/StoreFlow.swift | 39 +++++++++ Projects/Flow/Sources/TabsFlow.swift | 110 ++++++++++++++++++++++++ 6 files changed, 277 insertions(+), 11 deletions(-) create mode 100644 Projects/Flow/Sources/ChatFlow.swift create mode 100644 Projects/Flow/Sources/FriendsFlow.swift create mode 100644 Projects/Flow/Sources/MyPageFlow.swift create mode 100644 Projects/Flow/Sources/StoreFlow.swift create mode 100644 Projects/Flow/Sources/TabsFlow.swift diff --git a/Projects/Flow/Sources/AppFlow.swift b/Projects/Flow/Sources/AppFlow.swift index cc67c6b..5c6448a 100644 --- a/Projects/Flow/Sources/AppFlow.swift +++ b/Projects/Flow/Sources/AppFlow.swift @@ -65,18 +65,17 @@ private extension AppFlow { } func navigationToTab() -> FlowContributors { - let mainViewController = container.resolve(MainViewController.self)! - UIView.transition( - with: self.window, - duration: 0.5, - options: .transitionCrossDissolve - ) { - self.window.rootViewController = mainViewController + let tabsFlow = TabsFlow(container: container) + Flows.use( + tabsFlow, + when: .created + ) { [weak self] root in + self?.window.rootViewController = root } - return .one(flowContributor: .contribute( - withNextPresentable: mainViewController, - withNextStepper: mainViewController.reactor - )) + withNextPresentable: tabsFlow, + withNextStepper: OneStepper(withSingleStep: AppStep.tabIsRequired) + ) + ) } } diff --git a/Projects/Flow/Sources/ChatFlow.swift b/Projects/Flow/Sources/ChatFlow.swift new file mode 100644 index 0000000..2b07194 --- /dev/null +++ b/Projects/Flow/Sources/ChatFlow.swift @@ -0,0 +1,39 @@ +import UIKit +import RxFlow +import RxSwift +import Core +import Swinject +import Presentation + +public final class ChatFlow: Flow { + + public let container: Container + private let rootViewController = BaseNavigationController() + + public var root: Presentable { + return rootViewController + } + + init(container: Container) { + self.container = container + } + + public func navigate(to step: RxFlow.Step) -> RxFlow.FlowContributors { + guard let step = step as? ChatStep else { return .none } + switch step { + case .chatIsRequired: + return presentChat() + } + } +} + +extension ChatFlow { + private func presentChat() -> FlowContributors { + let chatViewController = container.resolve(ChatViewController.self)! + self.rootViewController.pushViewController(chatViewController, animated: false) + return .one(flowContributor: .contribute( + withNextPresentable: chatViewController, + withNextStepper: chatViewController.reactor + )) + } +} diff --git a/Projects/Flow/Sources/FriendsFlow.swift b/Projects/Flow/Sources/FriendsFlow.swift new file mode 100644 index 0000000..cba772c --- /dev/null +++ b/Projects/Flow/Sources/FriendsFlow.swift @@ -0,0 +1,40 @@ +import UIKit +import RxFlow +import RxSwift +import Core +import Swinject +import Presentation + +public final class FriendsFlow: Flow { + + public let container: Container + private let rootViewController = BaseNavigationController() + + public var root: Presentable { + return rootViewController + } + + init(container: Container) { + self.container = container + } + + public func navigate(to step: RxFlow.Step) -> RxFlow.FlowContributors { + guard let step = step as? FriendsStep else { return .none } + switch step { + case .friendsIsRequired: + return presentFriends() + } + } +} + +extension FriendsFlow { + private func presentFriends() -> FlowContributors { + let friendsViewController = container.resolve(FriendsViewController.self)! + self.rootViewController.pushViewController(friendsViewController, animated: false) + return .one(flowContributor: .contribute( + withNextPresentable: friendsViewController, + withNextStepper: friendsViewController.reactor + )) + } + +} diff --git a/Projects/Flow/Sources/MyPageFlow.swift b/Projects/Flow/Sources/MyPageFlow.swift new file mode 100644 index 0000000..330dbe4 --- /dev/null +++ b/Projects/Flow/Sources/MyPageFlow.swift @@ -0,0 +1,39 @@ +import UIKit +import RxFlow +import RxSwift +import Core +import Swinject +import Presentation + +public final class MyPageFlow: Flow { + + public let container: Container + private let rootViewController = BaseNavigationController() + + public var root: Presentable { + return rootViewController + } + + init(container: Container) { + self.container = container + } + + public func navigate(to step: RxFlow.Step) -> RxFlow.FlowContributors { + guard let step = step as? MyPageStep else { return .none } + switch step { + case .myPageIsRequired: + return presentMyPage() + } + } +} + +extension MyPageFlow { + private func presentMyPage() -> FlowContributors { + let myPageViewController = container.resolve(MyPageViewController.self)! + self.rootViewController.pushViewController(myPageViewController, animated: false) + return .one(flowContributor: .contribute( + withNextPresentable: rootViewController, + withNextStepper: myPageViewController.reactor + )) + } +} diff --git a/Projects/Flow/Sources/StoreFlow.swift b/Projects/Flow/Sources/StoreFlow.swift new file mode 100644 index 0000000..e9faac6 --- /dev/null +++ b/Projects/Flow/Sources/StoreFlow.swift @@ -0,0 +1,39 @@ +import UIKit +import RxFlow +import RxSwift +import Core +import Swinject +import Presentation + +public final class StoreFlow: Flow { + + public let container: Container + private let rootViewController = BaseNavigationController() + + public var root: Presentable { + return rootViewController + } + + init(container: Container) { + self.container = container + } + + public func navigate(to step: RxFlow.Step) -> RxFlow.FlowContributors { + guard let step = step as? StoreStep else { return .none } + switch step { + case .storeIsRequired: + return presentStore() + } + } +} + +extension StoreFlow { + private func presentStore() -> FlowContributors { + let storeViewController = container.resolve(StoreViewController.self)! + self.rootViewController.pushViewController(storeViewController, animated: false) + return .one(flowContributor: .contribute( + withNextPresentable: storeViewController, + withNextStepper: storeViewController.reactor + )) + } +} diff --git a/Projects/Flow/Sources/TabsFlow.swift b/Projects/Flow/Sources/TabsFlow.swift new file mode 100644 index 0000000..4d34a6d --- /dev/null +++ b/Projects/Flow/Sources/TabsFlow.swift @@ -0,0 +1,110 @@ +import UIKit +import RxFlow +import RxSwift +import Core +import Swinject +import Presentation +import DesignSystem + +public final class TabsFlow: Flow { + + public let container: Container + private let tabBarController = BaseTabBarController() + + public var root: Presentable { + return self.tabBarController + } + init(container: Container) { + self.container = container + } + + public func navigate(to step: RxFlow.Step) -> RxFlow.FlowContributors { + guard let step = step as? AppStep else { return .none } + switch step { + case .tabIsRequired: + return presentTabs() + default: + return .none + } + } + // swiftlint: disable function_body_length + private func presentTabs() -> FlowContributors { + let chatFlow = ChatFlow(container: container) + let friendsFlow = FriendsFlow(container: container) + let storeFlow = StoreFlow(container: container) + let myPageFlow = MyPageFlow(container: container) + + Flows.use( + chatFlow, + friendsFlow, + storeFlow, + myPageFlow, + when: .created + ) { [weak self] chat, friends, store, mypage in + + let tabItem1 = UITabBarItem( + title: nil, + image: UIImage.emotingImage(.chat), + selectedImage: UIImage.emotingImage(.chat).withTintColor( + .Main.main500, + renderingMode: .alwaysOriginal + ) + ) + let tabItem2 = UITabBarItem( + title: nil, + image: UIImage.emotingImage(.humanPlus), + selectedImage: UIImage.emotingImage(.humanPlus).withTintColor( + .Main.main500, + renderingMode: .alwaysOriginal + ) + ) + let tabItem3 = UITabBarItem( + title: nil, + image: UIImage.emotingImage(.store), + selectedImage: UIImage.emotingImage(.store).withTintColor( + .Main.main500, + renderingMode: .alwaysOriginal + ) + ) + let tabItem4 = UITabBarItem( + title: nil, + image: UIImage.emotingImage(.userProfile), + selectedImage: UIImage.emotingImage(.userProfile).withTintColor( + .Main.main500, + renderingMode: .alwaysOriginal + ) + ) + chat.tabBarItem = tabItem1 + friends.tabBarItem = tabItem2 + store.tabBarItem = tabItem3 + mypage.tabBarItem = tabItem4 + + self?.tabBarController.setViewControllers( + [ + chat, + friends, + store, + mypage + ], animated: false) + } + return .multiple(flowContributors: [ + .contribute( + withNextPresentable: chatFlow, + withNextStepper: OneStepper(withSingleStep: ChatStep.chatIsRequired) + ), + .contribute( + withNextPresentable: friendsFlow, + withNextStepper: OneStepper(withSingleStep: FriendsStep.friendsIsRequired) + ), + .contribute( + withNextPresentable: storeFlow, + withNextStepper: OneStepper(withSingleStep: StoreStep.storeIsRequired) + ), + .contribute( + withNextPresentable: myPageFlow, + withNextStepper: OneStepper(withSingleStep: MyPageStep.myPageIsRequired) + ) + ]) + } + // swiftlint: enable function_body_length +} From 8e8aada221d8bd852985cc24441a8fd3a999aee0 Mon Sep 17 00:00:00 2001 From: parkdoyeon1 Date: Tue, 5 Mar 2024 13:30:14 +0900 Subject: [PATCH 04/12] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20::=20UIView+addTopBo?= =?UTF-8?q?rder?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Extension/UIView/UIView+addTopBorder.swift | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 Projects/Modules/DesignSystem/Sources/Extension/UIView/UIView+addTopBorder.swift diff --git a/Projects/Modules/DesignSystem/Sources/Extension/UIView/UIView+addTopBorder.swift b/Projects/Modules/DesignSystem/Sources/Extension/UIView/UIView+addTopBorder.swift new file mode 100644 index 0000000..67f8768 --- /dev/null +++ b/Projects/Modules/DesignSystem/Sources/Extension/UIView/UIView+addTopBorder.swift @@ -0,0 +1,12 @@ +import UIKit + +extension UIView { + public func addTopBorder(with color: UIColor?, andWidth borderWidth: CGFloat) { + let border = UIView() + border.backgroundColor = color + border.autoresizingMask = [.flexibleWidth, .flexibleBottomMargin] + border.frame = CGRect(x: 0, y: 0, width: frame.size.width, height: borderWidth) + addSubview(border) + } + +} From a41d8aa2ee50e059f3081b40a571fdd3fbd73e8d Mon Sep 17 00:00:00 2001 From: parkdoyeon1 Date: Tue, 5 Mar 2024 13:30:58 +0900 Subject: [PATCH 05/12] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20::=20BaseTabBarContr?= =?UTF-8?q?oller?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sources/Base/BaseTabBarController.swift | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Projects/Presentation/Sources/Base/BaseTabBarController.swift b/Projects/Presentation/Sources/Base/BaseTabBarController.swift index 573ebf9..a9192fa 100644 --- a/Projects/Presentation/Sources/Base/BaseTabBarController.swift +++ b/Projects/Presentation/Sources/Base/BaseTabBarController.swift @@ -6,18 +6,16 @@ import DesignSystem public class BaseTabBarController: UITabBarController, SetLayoutable, AddViewable { - private let stroke = UIView().then { _ in -// $0.backgroundColor = .GrayScale.gray30 + private let stroke = UIView().then { + $0.backgroundColor = .white + $0.addTopBorder(with: .GrayScale.gray100, andWidth: 1) } private let impactFeedbackGenerator = UIImpactFeedbackGenerator(style: .light) public override func viewDidLoad() { super.viewDidLoad() -// self.tabBar.tintColor = .GrayScale.gray90 -// self.tabBar.unselectedItemTintColor = .GrayScale.gray50 -// self.tabBar.backgroundColor = .GrayScale.gray10 self.delegate = self - + self.tabBar.isTranslucent = false addView() setLayout() } @@ -30,7 +28,7 @@ public class BaseTabBarController: UITabBarController, stroke.snp.makeConstraints { $0.top.equalToSuperview().offset(-1) $0.leading.trailing.equalToSuperview() - $0.height.equalTo(1) + $0.height.equalTo(16) } } From 772b4a1737246f3e55689f96b08c3b9a84246823 Mon Sep 17 00:00:00 2001 From: parkdoyeon1 Date: Tue, 5 Mar 2024 13:31:21 +0900 Subject: [PATCH 06/12] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20::=20Assembly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sources/DI/PresentationAssembly.swift | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Projects/Presentation/Sources/DI/PresentationAssembly.swift b/Projects/Presentation/Sources/DI/PresentationAssembly.swift index 0216f88..68a0429 100644 --- a/Projects/Presentation/Sources/DI/PresentationAssembly.swift +++ b/Projects/Presentation/Sources/DI/PresentationAssembly.swift @@ -62,5 +62,33 @@ public final class PresentationAssembly: Assembly { container.register(ProfilSignupViewController.self) { resolver in ProfilSignupViewController(resolver.resolve(ProfilSignupReactor.self)!) } + + container.register(ChatReactor.self) { _ in + ChatReactor() + } + container.register(ChatViewController.self) { resolver in + ChatViewController(resolver.resolve(ChatReactor.self)!) + } + + container.register(FriendsReactor.self) { _ in + FriendsReactor() + } + container.register(FriendsViewController.self) { resolver in + FriendsViewController(resolver.resolve(FriendsReactor.self)!) + } + + container.register(StoreReactor.self) { _ in + StoreReactor() + } + container.register(StoreViewController.self) { resolver in + StoreViewController(resolver.resolve(StoreReactor.self)!) + } + + container.register(MyPageReactor.self) { _ in + MyPageReactor() + } + container.register(MyPageViewController.self) { resolver in + MyPageViewController(resolver.resolve(MyPageReactor.self)!) + } } } From bf248aaa2db1c20d6bc121220fe1451dc4ecfd42 Mon Sep 17 00:00:00 2001 From: parkdoyeon1 Date: Tue, 5 Mar 2024 13:31:55 +0900 Subject: [PATCH 07/12] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20::=20ViewController?= =?UTF-8?q?=20&=20Reactor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sources/Main/MainViewController.swift | 3 --- .../Chat/ChatReactor.swift} | 7 +------ .../Tabs/Chat/ChatViewController.swift | 3 +++ .../Sources/Tabs/Friends/FriendsReactor.swift | 19 +++++++++++++++++++ .../Tabs/Friends/FriendsViewController.swift | 8 ++++++++ .../Sources/Tabs/MyPage/MyPageReactor.swift | 19 +++++++++++++++++++ .../Tabs/MyPage/MyPageViewController.swift | 5 +++++ .../Sources/Tabs/Store/StoreReactor.swift | 19 +++++++++++++++++++ .../Tabs/Store/StoreViewController.swift | 3 +++ 9 files changed, 77 insertions(+), 9 deletions(-) delete mode 100644 Projects/Presentation/Sources/Main/MainViewController.swift rename Projects/Presentation/Sources/{Main/MainReactor.swift => Tabs/Chat/ChatReactor.swift} (59%) create mode 100644 Projects/Presentation/Sources/Tabs/Chat/ChatViewController.swift create mode 100644 Projects/Presentation/Sources/Tabs/Friends/FriendsReactor.swift create mode 100644 Projects/Presentation/Sources/Tabs/Friends/FriendsViewController.swift create mode 100644 Projects/Presentation/Sources/Tabs/MyPage/MyPageReactor.swift create mode 100644 Projects/Presentation/Sources/Tabs/MyPage/MyPageViewController.swift create mode 100644 Projects/Presentation/Sources/Tabs/Store/StoreReactor.swift create mode 100644 Projects/Presentation/Sources/Tabs/Store/StoreViewController.swift diff --git a/Projects/Presentation/Sources/Main/MainViewController.swift b/Projects/Presentation/Sources/Main/MainViewController.swift deleted file mode 100644 index 4a2a066..0000000 --- a/Projects/Presentation/Sources/Main/MainViewController.swift +++ /dev/null @@ -1,3 +0,0 @@ -import UIKit - -public class MainViewController: BaseReactorViewController {} diff --git a/Projects/Presentation/Sources/Main/MainReactor.swift b/Projects/Presentation/Sources/Tabs/Chat/ChatReactor.swift similarity index 59% rename from Projects/Presentation/Sources/Main/MainReactor.swift rename to Projects/Presentation/Sources/Tabs/Chat/ChatReactor.swift index 89d596f..12ec856 100644 --- a/Projects/Presentation/Sources/Main/MainReactor.swift +++ b/Projects/Presentation/Sources/Tabs/Chat/ChatReactor.swift @@ -5,7 +5,7 @@ import Domain import RxFlow import Core -public final class MainReactor: BaseReactor, Stepper { +public final class ChatReactor: BaseReactor, Stepper { public let steps = PublishRelay() public let initialState = State() private let disposeBag = DisposeBag() @@ -17,8 +17,3 @@ public final class MainReactor: BaseReactor, Stepper { public struct State { } } - -extension MainReactor { - public func mutate(action: Action) -> Observable { } - public func reduce(state: State, mutation: Mutation) -> State { } -} diff --git a/Projects/Presentation/Sources/Tabs/Chat/ChatViewController.swift b/Projects/Presentation/Sources/Tabs/Chat/ChatViewController.swift new file mode 100644 index 0000000..891e0fa --- /dev/null +++ b/Projects/Presentation/Sources/Tabs/Chat/ChatViewController.swift @@ -0,0 +1,3 @@ +import UIKit + +public class ChatViewController: BaseReactorViewController { } diff --git a/Projects/Presentation/Sources/Tabs/Friends/FriendsReactor.swift b/Projects/Presentation/Sources/Tabs/Friends/FriendsReactor.swift new file mode 100644 index 0000000..bfab69a --- /dev/null +++ b/Projects/Presentation/Sources/Tabs/Friends/FriendsReactor.swift @@ -0,0 +1,19 @@ +import ReactorKit +import RxSwift +import RxCocoa +import Domain +import RxFlow +import Core + +public final class FriendsReactor: BaseReactor, Stepper { + public let steps = PublishRelay() + public let initialState = State() + private let disposeBag = DisposeBag() + public init() {} + + public enum Action { } + + public enum Mutation { } + + public struct State { } +} diff --git a/Projects/Presentation/Sources/Tabs/Friends/FriendsViewController.swift b/Projects/Presentation/Sources/Tabs/Friends/FriendsViewController.swift new file mode 100644 index 0000000..d2f172c --- /dev/null +++ b/Projects/Presentation/Sources/Tabs/Friends/FriendsViewController.swift @@ -0,0 +1,8 @@ +import UIKit + +public class FriendsViewController: BaseReactorViewController { + + public override func bindAction() { + view.backgroundColor = .black + } +} diff --git a/Projects/Presentation/Sources/Tabs/MyPage/MyPageReactor.swift b/Projects/Presentation/Sources/Tabs/MyPage/MyPageReactor.swift new file mode 100644 index 0000000..961eb6b --- /dev/null +++ b/Projects/Presentation/Sources/Tabs/MyPage/MyPageReactor.swift @@ -0,0 +1,19 @@ +import ReactorKit +import RxSwift +import RxCocoa +import Domain +import RxFlow +import Core + +public final class MyPageReactor: BaseReactor, Stepper { + public let steps = PublishRelay() + public let initialState = State() + private let disposeBag = DisposeBag() + public init() {} + + public enum Action { } + + public enum Mutation { } + + public struct State { } +} diff --git a/Projects/Presentation/Sources/Tabs/MyPage/MyPageViewController.swift b/Projects/Presentation/Sources/Tabs/MyPage/MyPageViewController.swift new file mode 100644 index 0000000..4dfb93b --- /dev/null +++ b/Projects/Presentation/Sources/Tabs/MyPage/MyPageViewController.swift @@ -0,0 +1,5 @@ +import UIKit + +public class MyPageViewController: BaseReactorViewController { + +} diff --git a/Projects/Presentation/Sources/Tabs/Store/StoreReactor.swift b/Projects/Presentation/Sources/Tabs/Store/StoreReactor.swift new file mode 100644 index 0000000..94965e9 --- /dev/null +++ b/Projects/Presentation/Sources/Tabs/Store/StoreReactor.swift @@ -0,0 +1,19 @@ +import ReactorKit +import RxSwift +import RxCocoa +import Domain +import RxFlow +import Core + +public final class StoreReactor: BaseReactor, Stepper { + public let steps = PublishRelay() + public let initialState = State() + private let disposeBag = DisposeBag() + public init() {} + + public enum Action { } + + public enum Mutation { } + + public struct State { } +} diff --git a/Projects/Presentation/Sources/Tabs/Store/StoreViewController.swift b/Projects/Presentation/Sources/Tabs/Store/StoreViewController.swift new file mode 100644 index 0000000..57a4a04 --- /dev/null +++ b/Projects/Presentation/Sources/Tabs/Store/StoreViewController.swift @@ -0,0 +1,3 @@ +import UIKit + +public class StoreViewController: BaseReactorViewController { } From cdea9cf427da9290029ecadd3eaa8eb12176bd32 Mon Sep 17 00:00:00 2001 From: parkdoyeon1 Date: Tue, 5 Mar 2024 13:32:36 +0900 Subject: [PATCH 08/12] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20::=20Images?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sources/Image/EmotingImage.swift | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Projects/Modules/DesignSystem/Sources/Image/EmotingImage.swift b/Projects/Modules/DesignSystem/Sources/Image/EmotingImage.swift index e97b042..4fb4ff4 100644 --- a/Projects/Modules/DesignSystem/Sources/Image/EmotingImage.swift +++ b/Projects/Modules/DesignSystem/Sources/Image/EmotingImage.swift @@ -12,6 +12,10 @@ public enum EmotingImage { case kakao case naver case google + case chat + case humanPlus + case store + case userProfile } extension EmotingImage { @@ -29,6 +33,18 @@ extension EmotingImage { case .google: return dsImages.google.image + + case .chat: + return dsImages.chat.image + + case .humanPlus: + return dsImages.humanPlus.image + + case .store: + return dsImages.store.image + + case .userProfile: + return dsImages.userProfile.image } } } From cbdff879d724fae0d93fbf0c3c18b22e28e2b42f Mon Sep 17 00:00:00 2001 From: parkdoyeon1 Date: Tue, 5 Mar 2024 13:32:52 +0900 Subject: [PATCH 09/12] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20::=20DesignSystem=20?= =?UTF-8?q?=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Projects/App/Sources/AppDelegate.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/Projects/App/Sources/AppDelegate.swift b/Projects/App/Sources/AppDelegate.swift index b28704c..4bab84f 100644 --- a/Projects/App/Sources/AppDelegate.swift +++ b/Projects/App/Sources/AppDelegate.swift @@ -5,7 +5,6 @@ import Then import Presentation import Domain import Core -import DesignSystem @main final class AppDelegate: UIResponder, UIApplicationDelegate { From 3fd3640009df63345f58e5a369728c6794d57c5a Mon Sep 17 00:00:00 2001 From: parkdoyeon1 Date: Tue, 5 Mar 2024 13:36:35 +0900 Subject: [PATCH 10/12] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20::=20SwiftLint=20?= =?UTF-8?q?=EB=AC=B4=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Projects/Presentation/Sources/DI/PresentationAssembly.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Projects/Presentation/Sources/DI/PresentationAssembly.swift b/Projects/Presentation/Sources/DI/PresentationAssembly.swift index 68a0429..74109a6 100644 --- a/Projects/Presentation/Sources/DI/PresentationAssembly.swift +++ b/Projects/Presentation/Sources/DI/PresentationAssembly.swift @@ -6,6 +6,7 @@ import Domain public final class PresentationAssembly: Assembly { public init() {} + // swiftlint: disable function_body_length public func assemble(container: Container) { container.register(OnboardingReactor.self) { _ in OnboardingReactor() @@ -90,5 +91,6 @@ public final class PresentationAssembly: Assembly { container.register(MyPageViewController.self) { resolver in MyPageViewController(resolver.resolve(MyPageReactor.self)!) } + // swiftlint: enable function_body_length } } From 71a9ebe8df897932eda43f682c685a0a2d16ab38 Mon Sep 17 00:00:00 2001 From: parkdoyeon1 Date: Tue, 5 Mar 2024 13:49:21 +0900 Subject: [PATCH 11/12] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20::=20=ED=95=84?= =?UTF-8?q?=EC=9A=94=EC=97=86=EB=8A=94=EA=B1=B0=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sources/Tabs/Friends/FriendsViewController.swift | 7 +------ .../Sources/Tabs/MyPage/MyPageViewController.swift | 4 +--- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/Projects/Presentation/Sources/Tabs/Friends/FriendsViewController.swift b/Projects/Presentation/Sources/Tabs/Friends/FriendsViewController.swift index d2f172c..7308ed9 100644 --- a/Projects/Presentation/Sources/Tabs/Friends/FriendsViewController.swift +++ b/Projects/Presentation/Sources/Tabs/Friends/FriendsViewController.swift @@ -1,8 +1,3 @@ import UIKit -public class FriendsViewController: BaseReactorViewController { - - public override func bindAction() { - view.backgroundColor = .black - } -} +public class FriendsViewController: BaseReactorViewController { } diff --git a/Projects/Presentation/Sources/Tabs/MyPage/MyPageViewController.swift b/Projects/Presentation/Sources/Tabs/MyPage/MyPageViewController.swift index 4dfb93b..e88ef7a 100644 --- a/Projects/Presentation/Sources/Tabs/MyPage/MyPageViewController.swift +++ b/Projects/Presentation/Sources/Tabs/MyPage/MyPageViewController.swift @@ -1,5 +1,3 @@ import UIKit -public class MyPageViewController: BaseReactorViewController { - -} +public class MyPageViewController: BaseReactorViewController { } From ae3441ebc63e216dcc174019ccb352d55d54e21a Mon Sep 17 00:00:00 2001 From: parkdoyeon1 Date: Tue, 5 Mar 2024 14:53:14 +0900 Subject: [PATCH 12/12] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20::=20present=20->=20?= =?UTF-8?q?navigateTo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Projects/Flow/Sources/ChatFlow.swift | 4 ++-- Projects/Flow/Sources/FriendsFlow.swift | 4 ++-- Projects/Flow/Sources/StoreFlow.swift | 4 ++-- Projects/Flow/Sources/TabsFlow.swift | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Projects/Flow/Sources/ChatFlow.swift b/Projects/Flow/Sources/ChatFlow.swift index 2b07194..fe62b30 100644 --- a/Projects/Flow/Sources/ChatFlow.swift +++ b/Projects/Flow/Sources/ChatFlow.swift @@ -22,13 +22,13 @@ public final class ChatFlow: Flow { guard let step = step as? ChatStep else { return .none } switch step { case .chatIsRequired: - return presentChat() + return navigateToChat() } } } extension ChatFlow { - private func presentChat() -> FlowContributors { + private func navigateToChat() -> FlowContributors { let chatViewController = container.resolve(ChatViewController.self)! self.rootViewController.pushViewController(chatViewController, animated: false) return .one(flowContributor: .contribute( diff --git a/Projects/Flow/Sources/FriendsFlow.swift b/Projects/Flow/Sources/FriendsFlow.swift index cba772c..b2d674d 100644 --- a/Projects/Flow/Sources/FriendsFlow.swift +++ b/Projects/Flow/Sources/FriendsFlow.swift @@ -22,13 +22,13 @@ public final class FriendsFlow: Flow { guard let step = step as? FriendsStep else { return .none } switch step { case .friendsIsRequired: - return presentFriends() + return navigateToFriends() } } } extension FriendsFlow { - private func presentFriends() -> FlowContributors { + private func navigateToFriends() -> FlowContributors { let friendsViewController = container.resolve(FriendsViewController.self)! self.rootViewController.pushViewController(friendsViewController, animated: false) return .one(flowContributor: .contribute( diff --git a/Projects/Flow/Sources/StoreFlow.swift b/Projects/Flow/Sources/StoreFlow.swift index e9faac6..5194193 100644 --- a/Projects/Flow/Sources/StoreFlow.swift +++ b/Projects/Flow/Sources/StoreFlow.swift @@ -22,13 +22,13 @@ public final class StoreFlow: Flow { guard let step = step as? StoreStep else { return .none } switch step { case .storeIsRequired: - return presentStore() + return navigateToStore() } } } extension StoreFlow { - private func presentStore() -> FlowContributors { + private func navigateToStore() -> FlowContributors { let storeViewController = container.resolve(StoreViewController.self)! self.rootViewController.pushViewController(storeViewController, animated: false) return .one(flowContributor: .contribute( diff --git a/Projects/Flow/Sources/TabsFlow.swift b/Projects/Flow/Sources/TabsFlow.swift index 4d34a6d..bf22c7f 100644 --- a/Projects/Flow/Sources/TabsFlow.swift +++ b/Projects/Flow/Sources/TabsFlow.swift @@ -22,13 +22,13 @@ public final class TabsFlow: Flow { guard let step = step as? AppStep else { return .none } switch step { case .tabIsRequired: - return presentTabs() + return navigateToTabs() default: return .none } } // swiftlint: disable function_body_length - private func presentTabs() -> FlowContributors { + private func navigateToTabs() -> FlowContributors { let chatFlow = ChatFlow(container: container) let friendsFlow = FriendsFlow(container: container) let storeFlow = StoreFlow(container: container)