Skip to content

Commit

Permalink
Merge pull request #37 from Team-Ampersand/34-main-page-tabbar
Browse files Browse the repository at this point in the history
🔀 :: 메인 페이지 탭바 세팅
  • Loading branch information
baekteun authored May 25, 2023
2 parents 5dcb366 + 5fd9688 commit 9545d82
Show file tree
Hide file tree
Showing 16 changed files with 100 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ public enum ModulePaths {

public extension ModulePaths {
enum Feature: String {
case MainTabFeature
case RenewalPasswordFeature
case SignupFeature
case MainFeature
case RootFeature
case SigninFeature
case BaseFeature
Expand Down
3 changes: 2 additions & 1 deletion Projects/App/Project.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import ProjectDescriptionHelpers
import ProjectDescription
import ConfigurationPlugin
import DependencyPlugin
import EnvironmentPlugin
import Foundation
Expand Down Expand Up @@ -33,7 +34,7 @@ let targets: [Target] = [
dependencies: [
.feature(target: .RootFeature),
.feature(target: .SigninFeature),
.feature(target: .MainFeature),
.feature(target: .MainTabFeature),
.feature(target: .SignupFeature),
.feature(target: .RenewalPasswordFeature),
.domain(target: .AuthDomain),
Expand Down
2 changes: 1 addition & 1 deletion Projects/App/Sources/Application/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import AuthDomain
import IQKeyboardManagerSwift
import JwtStore
import MainFeature
import MainTabFeature
import RenewalPasswordFeature
import RootFeature
import SigninFeature
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
</document>
19 changes: 19 additions & 0 deletions Projects/Feature/MainTabFeature/Demo/Sources/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import UIKit

@main
final class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?

func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
) -> Bool {
window = UIWindow(frame: UIScreen.main.bounds)
let viewController = UIViewController()
viewController.view.backgroundColor = .yellow
window?.rootViewController = viewController
window?.makeKeyAndVisible()

return true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import ProjectDescriptionHelpers
import DependencyPlugin

let project = Project.makeModule(
name: ModulePaths.Feature.MainFeature.rawValue,
name: ModulePaths.Feature.MainTabFeature.rawValue,
product: .staticLibrary,
targets: [.unitTest],
targets: [.unitTest, .demo],
internalDependencies: [
.feature(target: .BaseFeature)
]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Moordinator
import UIKit

public protocol MainFactory {
func makeMoordinator() -> Moordinator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ import Moordinator

public struct MainFactoryImpl: MainFactory {
public func makeMoordinator() -> Moordinator {
MainMoordinator()
MainTabMoordinator()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import BaseFeature
import UIKit
import Moordinator

final class MainTabMoordinator: Moordinator {
private let rootVC = MainTabbarController()

var root: Presentable {
rootVC
}

func route(to path: RoutePath) -> MoordinatorContributors {
guard let path = path.asDotori else { return .none }
switch path {
case .main:
return coordinateToMainTab()

default:
return .none
}
return .none
}
}

private extension MainTabMoordinator {
func coordinateToMainTab() -> MoordinatorContributors {
return .none
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import BaseFeature
import DesignSystem
import UIKit

final class MainTabbarController: UITabBarController {
override func viewDidLoad() {
super.viewDidLoad()
configureViewController()
}
}

private extension MainTabbarController {
func configureViewController() {
self.tabBar.tintColor = .dotori(.primary(.p10))
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import XCTest

final class MainFeatureTests: XCTestCase {
final class MainTabFeatureTests: XCTestCase {
override func setUpWithError() throws {}

override func tearDownWithError() throws {}
Expand Down
2 changes: 1 addition & 1 deletion Projects/Feature/RootFeature/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ let project = Project.makeModule(
targets: [],
internalDependencies: [
.feature(target: .SigninFeature),
.feature(target: .MainFeature),
.feature(target: .MainTabFeature),
.feature(target: .BaseFeature)
]
)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import MainFeature
import MainTabFeature
import SigninFeature
import Swinject

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import BaseFeature
import Combine
import MainFeature
import MainTabFeature
import Moordinator
import SigninFeature
import UIKit
Expand Down

0 comments on commit 9545d82

Please sign in to comment.