Skip to content

Commit

Permalink
Fix: getTitleText,getDescriptionText메서드를 computed property로 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
GeonH0 committed Jul 19, 2024
1 parent 10151ba commit 70d5c16
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,11 @@ final class AddRecipeView: UIView {
collectionView.reloadData()
}

func getTitleText() -> String? {
return titleTextField.text
var titleText: String {
return titleTextField.text ?? ""
}

func getDescriptionText() -> String? {
var descriptionText: String {
return descriptionTextView.text
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ extension AddRecipeViewController: AddRecipeViewDelegate {
}

func didTapSubmitButton() {
let title = contentView.getTitleText() ?? ""
let description = contentView.getDescriptionText() ?? ""
let title = contentView.titleText
let description = contentView.descriptionText
addRecipeInteractor.updateTitle(title)
addRecipeInteractor.updateDescription(description)
saveRecipeToServer()
Expand Down

0 comments on commit 70d5c16

Please sign in to comment.