-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- CameraDisplayViewController BBToast 메서드 추가 - CameraDisplayViewController 비즈니스 로직 수정
- Loading branch information
1 parent
0e94bcd
commit 2c89387
Showing
5 changed files
with
124 additions
and
49 deletions.
There are no files selected for viewing
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
69 changes: 69 additions & 0 deletions
69
14th-team5-iOS/App/Sources/Application/Navigator/CameraDisplayNavigator.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,69 @@ | ||
// | ||
// CameraDisplayNavigator.swift | ||
// App | ||
// | ||
// Created by Kim dohyun on 9/26/24. | ||
// | ||
|
||
import Core | ||
import DesignSystem | ||
import UIKit | ||
|
||
protocol CameraDisplayNavigatorProtocol: BaseNavigator { | ||
func toHome() | ||
func showToast() | ||
func showArchiveToast() | ||
func showWarningToast() | ||
} | ||
|
||
final class CameraDisplayNavigator: CameraDisplayNavigatorProtocol { | ||
|
||
//MARK: - Properties | ||
var navigationController: UINavigationController | ||
|
||
|
||
//MARK: - Intializer | ||
init(navigationController: UINavigationController) { | ||
self.navigationController = navigationController | ||
} | ||
|
||
//MARK: - Configure | ||
func toHome() { | ||
let vc = MainViewControllerWrapper().viewController | ||
navigationController.setViewControllers([vc], animated: true) | ||
} | ||
|
||
func showToast() { | ||
let config = BBToastConfiguration(direction: .bottom(yOffset: -360), animationTime: 1.0) | ||
let viewConfig = BBToastViewConfiguration(minWidth: 207) | ||
BBToast.default( | ||
image: DesignSystemAsset.warning.image, | ||
title: "8자까지 입력 가능해요", | ||
viewConfig: viewConfig, | ||
config: config | ||
).show() | ||
} | ||
|
||
func showArchiveToast() { | ||
let config = BBToastConfiguration(direction: .bottom(yOffset: 75)) | ||
let viewConfig = BBToastViewConfiguration(minWidth: 194) | ||
BBToast.default( | ||
image: DesignSystemAsset.camera.image.withTintColor(DesignSystemAsset.gray300.color), | ||
title: "사진이 저장되었습니다.", | ||
viewConfig: viewConfig, | ||
config: config | ||
).show() | ||
} | ||
|
||
func showWarningToast() { | ||
let config = BBToastConfiguration(direction: .bottom(yOffset: -360), animationTime: 1.0) | ||
let viewConfig = BBToastViewConfiguration(minWidth: 207) | ||
BBToast.default( | ||
image: DesignSystemAsset.warning.image, | ||
title: "띄어쓰기는 할 수 없어요", | ||
viewConfig: viewConfig, | ||
config: config | ||
).show() | ||
|
||
} | ||
} |
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