Skip to content

Commit

Permalink
[refactor] NewNoteInputViewController 구현 및 기존 파일 제거 #299
Browse files Browse the repository at this point in the history
  • Loading branch information
skkimeo committed Jul 1, 2023
1 parent 799aece commit 5d80248
Show file tree
Hide file tree
Showing 9 changed files with 503 additions and 686 deletions.
16 changes: 8 additions & 8 deletions Happiggy-bank/Happiggy-bank.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
A472C5F529C2DCEA00097432 /* NewNoteInputToolbar.swift in Sources */ = {isa = PBXBuildFile; fileRef = A472C5F429C2DCEA00097432 /* NewNoteInputToolbar.swift */; };
A472C5F729C2DDFF00097432 /* NewNoteInputViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A472C5F629C2DDFF00097432 /* NewNoteInputViewModel.swift */; };
A472C5F929C2ED5000097432 /* HBError.swift in Sources */ = {isa = PBXBuildFile; fileRef = A472C5F829C2ED5000097432 /* HBError.swift */; };
A472C5FB29C2F21600097432 /* NewNoteSavingDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A472C5FA29C2F21600097432 /* NewNoteSavingDelegate.swift */; };
A47D83462966C0C60028AA1D /* NotificationSettingsViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D22ADF7E27F72F7300ECB77B /* NotificationSettingsViewModel.swift */; };
A47D83482966D3870028AA1D /* FontSelectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A47D83472966D3870028AA1D /* FontSelectionView.swift */; };
A47D834A296716BF0028AA1D /* FontCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A47D8349296716BF0028AA1D /* FontCell.swift */; };
Expand Down Expand Up @@ -117,15 +118,14 @@
A4A55A0928FFC675004ABE00 /* NewNoteInputView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A4A55A0828FFC675004ABE00 /* NewNoteInputView.swift */; };
A4B285FD27D8A060008769EB /* Calendar+Duration.swift in Sources */ = {isa = PBXBuildFile; fileRef = A4B285FC27D8A060008769EB /* Calendar+Duration.swift */; };
A4B2860527D9A546008769EB /* NewNoteDatePickerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A4B2860427D9A546008769EB /* NewNoteDatePickerViewController.swift */; };
A4B2860927D9A56A008769EB /* NewNoteTextViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A4B2860827D9A56A008769EB /* NewNoteTextViewController.swift */; };
A4B2860927D9A56A008769EB /* NewNoteInputViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A4B2860827D9A56A008769EB /* NewNoteInputViewController.swift */; };
A4B2860B27D9B434008769EB /* UIViewController+FadeInOut.swift in Sources */ = {isa = PBXBuildFile; fileRef = A4B2860A27D9B434008769EB /* UIViewController+FadeInOut.swift */; };
A4B2860F27D9F539008769EB /* NewNoteDatePickerViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A4B2860E27D9F539008769EB /* NewNoteDatePickerViewModel.swift */; };
A4C1AFC027E477180096CD3E /* NSMutableAttributedString+ColorBold.swift in Sources */ = {isa = PBXBuildFile; fileRef = A4C1AFBF27E477180096CD3E /* NSMutableAttributedString+ColorBold.swift */; };
A4C1AFC227E47AD80096CD3E /* String+EmptyString.swift in Sources */ = {isa = PBXBuildFile; fileRef = A4C1AFC127E47AD80096CD3E /* String+EmptyString.swift */; };
A4C1AFC427E47DC50096CD3E /* String+NSMutableAttributedStringify.swift in Sources */ = {isa = PBXBuildFile; fileRef = A4C1AFC327E47DC50096CD3E /* String+NSMutableAttributedStringify.swift */; };
A4C1AFC627E482E10096CD3E /* CGFloat+Values.swift in Sources */ = {isa = PBXBuildFile; fileRef = A4C1AFC527E482E10096CD3E /* CGFloat+Values.swift */; };
A4C1AFCE27E4F8150096CD3E /* UIView+FadeInOut.swift in Sources */ = {isa = PBXBuildFile; fileRef = A4C1AFCD27E4F8150096CD3E /* UIView+FadeInOut.swift */; };
A4C1AFD227E5C60E0096CD3E /* NewNoteTextViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A4C1AFD127E5C60E0096CD3E /* NewNoteTextViewModel.swift */; };
A4C1AFD427E5E6120096CD3E /* UITextView+ParagraphStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = A4C1AFD327E5E6120096CD3E /* UITextView+ParagraphStyle.swift */; };
A4CF2C7C27C71FF5001B01B1 /* CATransition+PopupAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = A4CF2C7B27C71FF5001B01B1 /* CATransition+PopupAnimation.swift */; };
A4CF2C8027C733FE001B01B1 /* ColorButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = A4CF2C7F27C733FE001B01B1 /* ColorButton.swift */; };
Expand Down Expand Up @@ -251,6 +251,7 @@
A472C5F429C2DCEA00097432 /* NewNoteInputToolbar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewNoteInputToolbar.swift; sourceTree = "<group>"; };
A472C5F629C2DDFF00097432 /* NewNoteInputViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewNoteInputViewModel.swift; sourceTree = "<group>"; };
A472C5F829C2ED5000097432 /* HBError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HBError.swift; sourceTree = "<group>"; };
A472C5FA29C2F21600097432 /* NewNoteSavingDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewNoteSavingDelegate.swift; sourceTree = "<group>"; };
A47D83472966D3870028AA1D /* FontSelectionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FontSelectionView.swift; sourceTree = "<group>"; };
A47D8349296716BF0028AA1D /* FontCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FontCell.swift; sourceTree = "<group>"; };
A47D83532973A4860028AA1D /* FontPublishing.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FontPublishing.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -299,15 +300,14 @@
A4A55A0828FFC675004ABE00 /* NewNoteInputView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NewNoteInputView.swift; sourceTree = "<group>"; };
A4B285FC27D8A060008769EB /* Calendar+Duration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Calendar+Duration.swift"; sourceTree = "<group>"; };
A4B2860427D9A546008769EB /* NewNoteDatePickerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewNoteDatePickerViewController.swift; sourceTree = "<group>"; };
A4B2860827D9A56A008769EB /* NewNoteTextViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewNoteTextViewController.swift; sourceTree = "<group>"; };
A4B2860827D9A56A008769EB /* NewNoteInputViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewNoteInputViewController.swift; sourceTree = "<group>"; };
A4B2860A27D9B434008769EB /* UIViewController+FadeInOut.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIViewController+FadeInOut.swift"; sourceTree = "<group>"; };
A4B2860E27D9F539008769EB /* NewNoteDatePickerViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewNoteDatePickerViewModel.swift; sourceTree = "<group>"; };
A4C1AFBF27E477180096CD3E /* NSMutableAttributedString+ColorBold.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSMutableAttributedString+ColorBold.swift"; sourceTree = "<group>"; };
A4C1AFC127E47AD80096CD3E /* String+EmptyString.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+EmptyString.swift"; sourceTree = "<group>"; };
A4C1AFC327E47DC50096CD3E /* String+NSMutableAttributedStringify.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+NSMutableAttributedStringify.swift"; sourceTree = "<group>"; };
A4C1AFC527E482E10096CD3E /* CGFloat+Values.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CGFloat+Values.swift"; sourceTree = "<group>"; };
A4C1AFCD27E4F8150096CD3E /* UIView+FadeInOut.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView+FadeInOut.swift"; sourceTree = "<group>"; };
A4C1AFD127E5C60E0096CD3E /* NewNoteTextViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewNoteTextViewModel.swift; sourceTree = "<group>"; };
A4C1AFD327E5E6120096CD3E /* UITextView+ParagraphStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UITextView+ParagraphStyle.swift"; sourceTree = "<group>"; };
A4CF2C7B27C71FF5001B01B1 /* CATransition+PopupAnimation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CATransition+PopupAnimation.swift"; sourceTree = "<group>"; };
A4CF2C7F27C733FE001B01B1 /* ColorButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = ColorButton.swift; path = "Happiggy-bank/HomeTab/NewNote/UI/View/ColorButton.swift"; sourceTree = SOURCE_ROOT; };
Expand Down Expand Up @@ -574,6 +574,7 @@
A4569CB7280FB979001E3FD6 /* Presenter.swift */,
A4569CC528111EFA001E3FD6 /* InformationTextViewDataSource.swift */,
A4EDFE7E2902D5CB0056C2DC /* ColorPickerDelegate.swift */,
A472C5FA29C2F21600097432 /* NewNoteSavingDelegate.swift */,
);
path = Protocol;
sourceTree = "<group>";
Expand Down Expand Up @@ -796,7 +797,6 @@
isa = PBXGroup;
children = (
A4B2860E27D9F539008769EB /* NewNoteDatePickerViewModel.swift */,
A4C1AFD127E5C60E0096CD3E /* NewNoteTextViewModel.swift */,
A472C5F629C2DDFF00097432 /* NewNoteInputViewModel.swift */,
);
path = ViewModel;
Expand All @@ -815,7 +815,7 @@
isa = PBXGroup;
children = (
A4B2860427D9A546008769EB /* NewNoteDatePickerViewController.swift */,
A4B2860827D9A56A008769EB /* NewNoteTextViewController.swift */,
A4B2860827D9A56A008769EB /* NewNoteInputViewController.swift */,
);
path = Controller;
sourceTree = "<group>";
Expand Down Expand Up @@ -1383,7 +1383,6 @@
A467B5C827DA258700AC702D /* NewNoteDatePickerRowView.swift in Sources */,
A484A3052958945E00A58312 /* BaseTextView.swift in Sources */,
A484A327295EE22000A58312 /* String+SubstringsMatchingRegex.swift in Sources */,
A4C1AFD227E5C60E0096CD3E /* NewNoteTextViewModel.swift in Sources */,
A819CFA127DE034F00DE8E72 /* NewBottle.swift in Sources */,
A4569CBC2810455B001E3FD6 /* CustomerServiceViewController.swift in Sources */,
A4EDFE812902D72A0056C2DC /* ColorPickerBarItem.swift in Sources */,
Expand Down Expand Up @@ -1450,14 +1449,15 @@
A49AC5E52917C6E2009315BC /* UILabel+ChangeFontSize.swift in Sources */,
A4A55A0928FFC675004ABE00 /* NewNoteInputView.swift in Sources */,
A46B2E8329B5EBE6006A7870 /* NoteDetailListViewController.swift in Sources */,
A4B2860927D9A56A008769EB /* NewNoteTextViewController.swift in Sources */,
A4B2860927D9A56A008769EB /* NewNoteInputViewController.swift in Sources */,
A843332127DA026D00A12A54 /* NewBottleDatePickerViewController.swift in Sources */,
A4D6EB75282E2E6700553E43 /* VersionChecking.swift in Sources */,
A8FC07CA27B3ECF00077A758 /* SceneDelegate.swift in Sources */,
A4F5715427DB8B6500E7DF9B /* NewNote.swift in Sources */,
A466A31028018CD800D655F4 /* UIWindowScene+TopMostViewController.swift in Sources */,
A4569CC428111E1D001E3FD6 /* LicenseViewModel.swift in Sources */,
A466A30E28018BBD00D655F4 /* UIVIewController+TopMostViewController.swift in Sources */,
A472C5FB29C2F21600097432 /* NewNoteSavingDelegate.swift in Sources */,
D2C48C0127E9DFA1006FC59E /* NoteView.swift in Sources */,
A49B25E72812AC2800399630 /* FontSelectionViewController.swift in Sources */,
A456657E27CC77A9007CF70A /* Date+Formatted.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,10 @@ final class HomeTabViewController: UIViewController {
}

if bottle.isEmtpyToday {
// NewNoteTextViewController
// NewNoteInputViewController
let viewModel = NewNoteInputViewModel(date: Date(), bottle: bottle)
self.navigationController?.pushViewControllerWithFade(
to: UIViewController().then { $0.view.backgroundColor = .gray }
to: NewNoteInputViewController(viewModel: viewModel)
)
} else {
// NewNoteDatePickerViewController
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,14 +189,7 @@ final class HomeViewController: UIViewController {
let viewModel = NewNoteDatePickerViewModel(initialDate: Date(), bottle: bottle)
dateViewController.viewModel = viewModel
}
if segue.identifier == SegueIdentifier.presentNewNoteTextView {
guard let textViewController = segue.destination as? NewNoteTextViewController,
let bottle = self.viewModel.bottle
else { return }

let viewModel = NewNoteTextViewModel(date: Date(), bottle: bottle)
textViewController.viewModel = viewModel
}

if segue.identifier == SegueIdentifier.presentBottleMessageView {
guard let bottleMessageController = segue.destination as? BottleMessageViewController,
let (fakeBackground, bottle) = sender as? (UIView, Bottle)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,12 +232,12 @@ final class NewNoteDatePickerViewController: UIViewController {

override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if segue.identifier == SegueIdentifier.presentNewNoteTextViewFromDatePicker {

guard let textViewController = segue.destination as? NewNoteTextViewController
else { return }

let viewModel = NewNoteTextViewModel(date: self.viewModel.selectedDate, bottle: self.viewModel.bottle)
textViewController.viewModel = viewModel
//
// guard let textViewController = segue.destination as? NewNoteTextViewController
// else { return }
//
// let viewModel = NewNoteTextViewModel(date: self.viewModel.selectedDate, bottle: self.viewModel.bottle)
// textViewController.viewModel = viewModel
}
}
}
Expand Down
Loading

0 comments on commit 5d80248

Please sign in to comment.