Skip to content

Commit

Permalink
[Team-MoMo#226] 화면전환 함수 renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
jeongchoyi committed Jan 31, 2021
1 parent 8525203 commit 06c8242
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions MoMo/MoMo/Sources/View/HomeDayNightView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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?) {
Expand Down
4 changes: 2 additions & 2 deletions MoMo/MoMo/Sources/ViewControllers/HomeViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down

0 comments on commit 06c8242

Please sign in to comment.