Skip to content

Commit

Permalink
[Chore] #289 - 파라미터명과 함수명 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
EunsuSeo01 committed Nov 16, 2024
1 parent ce56dc3 commit 2faca07
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ final class ModifyMenuTextField: UITextField {
titleText: String,
originalText: String,
placeholderText: String? = nil,
hankkiTextFieldDelegate: ModifyMenuTextFieldDelegate? = nil
modifyMenuTextFieldDelegate: ModifyMenuTextFieldDelegate? = nil
) {
self.titleText = titleText
self.placeholderText = placeholderText
self.modifyMenuTextFieldDelegate = hankkiTextFieldDelegate
self.modifyMenuTextFieldDelegate = modifyMenuTextFieldDelegate
super.init(frame: .zero)
self.text = originalText

Expand Down Expand Up @@ -210,7 +210,7 @@ private extension ModifyMenuTextField {
inputAccessoryView = accessoryView
}

func changeModifyCompleteButtonStyle() {
func updateModifyCompleteButtonStyle() {
guard let modifyMenuTextFieldDelegate = modifyMenuTextFieldDelegate else { return }
let isValidData = modifyMenuTextFieldDelegate.isMenuDataValid()
enterMenuAccessoryView.modifyCompleteButton.backgroundColor = isValidData ? .red500 : .red400
Expand Down Expand Up @@ -258,13 +258,13 @@ private extension ModifyMenuTextField {
@objc func inputResetButtonDidTap() {
self.text = modifyMenuTextFieldDelegate?.getOriginalText(textField: self)
modifyMenuTextFieldDelegate?.updateModifiedMenuData(textField: self)
changeModifyCompleteButtonStyle()
updateModifyCompleteButtonStyle()
}

@objc func textFieldDidChange() {
guard let text = text, let modifyMenuTextFieldDelegate = modifyMenuTextFieldDelegate else { return }
modifyMenuTextFieldDelegate.updateModifiedMenuData(textField: self)
changeModifyCompleteButtonStyle()
updateModifyCompleteButtonStyle()
enterMenuAccessoryView.resetButton.isHidden = text.isEmpty

if titleText == StringLiterals.ModifyMenu.price, let price = Int(text) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ final class ModifyMenuViewController: BaseViewController {
titleText: StringLiterals.ModifyMenu.name,
originalText: viewModel.selectedMenu.name,
placeholderText: StringLiterals.ModifyMenu.namePlaceholder,
hankkiTextFieldDelegate: self
modifyMenuTextFieldDelegate: self
)
private lazy var priceTextField: ModifyMenuTextField = ModifyMenuTextField(
titleText: StringLiterals.ModifyMenu.price,
originalText: String(viewModel.selectedMenu.price),
hankkiTextFieldDelegate: self
modifyMenuTextFieldDelegate: self
)
private let over8000PriceLabel: UILabel = UILabel()
private lazy var bottomButtonView: BottomButtonView = BottomButtonView(
Expand Down

0 comments on commit 2faca07

Please sign in to comment.