diff --git a/MoMo/MoMo/Sources/View/HomeDayNightView.swift b/MoMo/MoMo/Sources/View/HomeDayNightView.swift index 11b99783..8bbb580b 100644 --- a/MoMo/MoMo/Sources/View/HomeDayNightView.swift +++ b/MoMo/MoMo/Sources/View/HomeDayNightView.swift @@ -8,8 +8,8 @@ import UIKit protocol HomeDayNightViewDelegate: class { - func writeButtonTouchUp(_ sender: UIButton) - func showAllButtonTouchUp(_ sender: UIButton, diaryId: Int) + func pushToMoodViewController(_ sender: UIButton) + func pushToDiaryViewController(_ sender: UIButton, diaryId: Int) } class HomeDayNightView: UIView { @@ -160,11 +160,11 @@ class HomeDayNightView: UIView { } @IBAction func writeButtonTouchUp(_ sender: UIButton) { - self.homeDayNightViewDelegate?.writeButtonTouchUp(self.writeButton) + self.homeDayNightViewDelegate?.pushToMoodViewController(self.writeButton) } @IBAction func showAllButtonTouchUp(_ sender: UIButton) { - self.homeDayNightViewDelegate?.showAllButtonTouchUp(self.showAllButton, diaryId: diaryId) + self.homeDayNightViewDelegate?.pushToDiaryViewController(self.showAllButton, diaryId: diaryId) } override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { diff --git a/MoMo/MoMo/Sources/ViewControllers/HomeViewController.swift b/MoMo/MoMo/Sources/ViewControllers/HomeViewController.swift index d503ae9c..48538f86 100644 --- a/MoMo/MoMo/Sources/ViewControllers/HomeViewController.swift +++ b/MoMo/MoMo/Sources/ViewControllers/HomeViewController.swift @@ -780,7 +780,7 @@ extension HomeViewController: UITableViewDelegate { } extension HomeViewController: HomeDayNightViewDelegate { - func writeButtonTouchUp(_ sender: UIButton) { + func pushToMoodViewController(_ sender: UIButton) { // 업로드 뷰로 푸쉬 let onboardingStoryboard = UIStoryboard(name: Constants.Name.onboardingStoryboard, bundle: nil) guard let moodViewController = onboardingStoryboard.instantiateViewController(identifier: Constants.Identifier.moodViewController) as? MoodViewController else { @@ -790,7 +790,7 @@ extension HomeViewController: HomeDayNightViewDelegate { self.navigationController?.pushViewController(moodViewController, animated: true) } - func showAllButtonTouchUp(_ sender: UIButton, diaryId: Int) { + func pushToDiaryViewController(_ sender: UIButton, diaryId: Int) { // 다이어리 뷰로 푸쉬 let diaryStoryboard = UIStoryboard(name: Constants.Name.diaryStoryboard, bundle: nil) guard let diaryViewController = diaryStoryboard.instantiateViewController(identifier: Constants.Identifier.diaryViewController) as? DiaryViewController else {