-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/develop' into feature/(#204)-rec…
…ruitment_filter # Conflicts: # Projects/Presentation/Sources/DI/PresentationAssembly.swift
- Loading branch information
Showing
29 changed files
with
542 additions
and
15 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import RxFlow | ||
|
||
public enum EasterEggStep: Step { | ||
case easterEggIsRequired | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import RxFlow | ||
|
||
public enum SearchCompanyStep: Step { | ||
case searchCompanyIsRequired | ||
case companyDetailIsRequired(id: Int) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import UIKit | ||
import Presentation | ||
import Swinject | ||
import RxFlow | ||
import Core | ||
|
||
public final class SearchCompanyFlow: Flow { | ||
public let container: Container | ||
private let rootViewController: SearchCompanyViewController | ||
public var root: Presentable { | ||
return rootViewController | ||
} | ||
|
||
public init(container: Container) { | ||
self.container = container | ||
self.rootViewController = container.resolve(SearchCompanyViewController.self)! | ||
} | ||
|
||
public func navigate(to step: Step) -> FlowContributors { | ||
guard let step = step as? SearchCompanyStep else { return .none } | ||
|
||
switch step { | ||
case .searchCompanyIsRequired: | ||
return navigateToSearchCompany() | ||
|
||
case let .companyDetailIsRequired(id): | ||
return navigateToCompanyDetail(id) | ||
} | ||
} | ||
} | ||
|
||
private extension SearchCompanyFlow { | ||
func navigateToSearchCompany() -> FlowContributors { | ||
return .one(flowContributor: .contribute( | ||
withNextPresentable: rootViewController, | ||
withNextStepper: rootViewController.viewModel | ||
)) | ||
} | ||
|
||
func navigateToCompanyDetail(_ companyId: Int) -> FlowContributors { | ||
let companyDetailFlow = CompanyDetailFlow(container: container) | ||
|
||
Flows.use(companyDetailFlow, when: .created) { (root) in | ||
let view = root as? CompanyDetailViewController | ||
view?.viewModel.companyID = companyId | ||
view?.viewModel.type = .searchCompany | ||
self.rootViewController.navigationController?.pushViewController( | ||
view!, animated: true | ||
) | ||
} | ||
|
||
return .one(flowContributor: .contribute( | ||
withNextPresentable: companyDetailFlow, | ||
withNextStepper: OneStepper(withSingleStep: CompanyDetailStep.companyDetailIsRequired) | ||
)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import UIKit | ||
import SwiftUI | ||
import Presentation | ||
import Swinject | ||
import RxFlow | ||
import Core | ||
|
||
|
||
public final class EasterEggFlow: Flow { | ||
public let container: Container | ||
private let rootViewController: RxFlowViewController | ||
public var root: Presentable { | ||
return rootViewController | ||
} | ||
|
||
public init(container: Container) { | ||
self.container = container | ||
self.rootViewController = container.resolve(EasterEggViewController.self)! | ||
} | ||
|
||
public func navigate(to step: Step) -> FlowContributors { | ||
guard let step = step as? EasterEggStep else { return .none } | ||
|
||
switch step { | ||
case .easterEggIsRequired: | ||
return navigateToEasterEgg() | ||
} | ||
} | ||
} | ||
|
||
private extension EasterEggFlow { | ||
func navigateToEasterEgg() -> FlowContributors { | ||
return .one(flowContributor: .contribute(withNext: rootViewController)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...cassets/Jobis logo.imageset/Contents.json → ...s/Easter Egg/Close.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+105 KB
...signSystem/Resources/Images/Images.xcassets/Easter Egg/Close.imageset/close.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,8 @@ | |
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
}, | ||
"properties" : { | ||
"provides-namespace" : true | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...s/Team return logo.imageset/Contents.json → ...ts/Easter Egg/Open.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+113 KB
...DesignSystem/Resources/Images/Images.xcassets/Easter Egg/Open.imageset/open.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file removed
BIN
-39.7 KB
...n/Resources/Images/OnboardingImages.xcassets/Jobis logo.imageset/Jobis logo.png
Binary file not shown.
Binary file removed
BIN
-13.5 KB
...Images/OnboardingImages.xcassets/Team return logo.imageset/Team return logo.png
Binary file not shown.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
Projects/Presentation/Sources/EasterEgg/EasterEggView.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import SwiftUI | ||
import DesignSystem | ||
|
||
struct EasterEggView: View { | ||
@State private var count = 0 | ||
@State private var angle = 0 | ||
@State private var index = 0 | ||
private var colors: [Color] = [ | ||
.yellow, | ||
.red, | ||
.blue, | ||
.green, | ||
.purple, | ||
.orange, | ||
.mint, | ||
.white | ||
] | ||
var body: some View { | ||
VStack { | ||
Button("", action: addAction) | ||
.buttonStyle(CatButtonStyle()) | ||
.rotationEffect(.degrees(Double(angle))) | ||
|
||
Text("\(count)") | ||
.padding(.top, 50) | ||
} | ||
.frame(maxWidth: .infinity, maxHeight: .infinity) | ||
.padding() | ||
.background(colors[index]) | ||
} | ||
|
||
private func addAction() { | ||
count += 1 | ||
angle = (angle + 45) % 360 | ||
index = Int.random(in: 0..<colors.count) | ||
HapticManager.instance.impact(style: .heavy) | ||
} | ||
} | ||
|
||
private struct CatButtonStyle: ButtonStyle { | ||
func makeBody(configuration: Configuration) -> some View { | ||
configuration.isPressed ? DesignSystemAsset.Images.EasterEgg.open.swiftUIImage: | ||
DesignSystemAsset.Images.EasterEgg.close.swiftUIImage | ||
} | ||
} | ||
|
||
final private class HapticManager { | ||
static let instance = HapticManager() | ||
|
||
func notification(type: UINotificationFeedbackGenerator.FeedbackType) { | ||
|
||
let generator = UINotificationFeedbackGenerator() | ||
generator.notificationOccurred(type) | ||
} | ||
|
||
func impact(style: UIImpactFeedbackGenerator.FeedbackStyle) { | ||
let generator = UIImpactFeedbackGenerator(style: style) | ||
generator.impactOccurred() | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
Projects/Presentation/Sources/EasterEgg/EasterEggViewController.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import UIKit | ||
import SwiftUI | ||
import RxFlow | ||
import RxCocoa | ||
import RxSwift | ||
import DesignSystem | ||
|
||
public final class EasterEggViewController: RxFlowViewController { | ||
public init() { | ||
super.init(nibName: nil, bundle: nil) | ||
contentViewController = UIHostingController(rootView: EasterEggView()) | ||
} | ||
|
||
required init?(coder: NSCoder) { | ||
fatalError("init(coder:) has not been implemented") | ||
} | ||
|
||
public override func viewDidLoad() { | ||
super.viewDidLoad() | ||
} | ||
|
||
public override func viewWillAppear(_ animated: Bool) { | ||
self.hideTabbar() | ||
} | ||
} |
Oops, something went wrong.