@@ -40,7 +40,7 @@ final class WithdrawViewController: BaseViewController<WithdrawViewModel> {
4040 private let withdrawReasonView = UIView ( )
4141 private let withdrawReasonLabel = UILabel ( )
4242 private let withdrawReasonStackView = UIStackView ( )
43- private var withdrawButtons : [ WithdrawReason : BitnagilChoiceButton ] = [ : ]
43+ private var withdrawReasonButtons : [ WithdrawReason : BitnagilChoiceButton ] = [ : ]
4444 private let withdrawReasonTextBackgroundView = UIView ( )
4545 private let withdrawReasonTextViewPlaceholder = UILabel ( )
4646 private let withdrawReasonTextView = UITextView ( )
@@ -121,7 +121,7 @@ final class WithdrawViewController: BaseViewController<WithdrawViewModel> {
121121 make. height. equalTo ( Layout . withdrawChoiceButtonHeight)
122122 }
123123 withdrawReasonStackView. addArrangedSubview ( withdrawChoiceButton)
124- withdrawButtons [ withdrawReason] = withdrawChoiceButton
124+ withdrawReasonButtons [ withdrawReason] = withdrawChoiceButton
125125 }
126126
127127 withdrawReasonTextBackgroundView. backgroundColor = BitnagilColor . gray99
@@ -147,6 +147,10 @@ final class WithdrawViewController: BaseViewController<WithdrawViewModel> {
147147 self ? . viewModel. action ( input: . withdrawService)
148148 } ,
149149 for: . touchUpInside)
150+
151+ let tapGesture = UITapGestureRecognizer ( target: self , action: #selector( dismissKeyboard) )
152+ tapGesture. cancelsTouchesInView = false
153+ view. addGestureRecognizer ( tapGesture)
150154 }
151155
152156 override func configureLayout( ) {
@@ -284,7 +288,7 @@ final class WithdrawViewController: BaseViewController<WithdrawViewModel> {
284288 }
285289
286290 private func updateWithdrawReason( selectedWithdrawReason: WithdrawReason ? ) {
287- withdrawButtons . forEach { withdrawReason in
291+ withdrawReasonButtons . forEach { withdrawReason in
288292 let isSelected = withdrawReason. key == selectedWithdrawReason
289293 withdrawReason. value. updateButtonState ( isChecked: isSelected)
290294 }
@@ -296,6 +300,10 @@ final class WithdrawViewController: BaseViewController<WithdrawViewModel> {
296300 withdrawReasonMaxLengthLabel. isHidden = true
297301 }
298302 }
303+
304+ @objc private func dismissKeyboard( ) {
305+ view. endEditing ( true )
306+ }
299307}
300308
301309extension WithdrawViewController : UITextViewDelegate {
0 commit comments