Skip to content

Commit 31d0c3b

Browse files
committed
Fix: 루틴 등록 수정
- 키보드 입력 끊김 이슈 수정 - 루틴 반복 선택하지 않아도 등록 활성화 되도록 수정
1 parent 966002e commit 31d0c3b

5 files changed

Lines changed: 10 additions & 13 deletions

File tree

Projects/Presentation/Sources/RecommendedRoutine/View/RecommendedRoutineView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ extension RecommendedRoutineView: FloatingMenuViewDelegate {
327327
fatalError("routineCreationViewModel 의존성이 등록되지 않았습니다.")
328328
}
329329
let routineCreationView = RoutineCreationView(viewModel: routineCreationViewModel)
330+
routineCreationView.hidesBottomBarWhenPushed = true
330331
self.navigationController?.pushViewController(routineCreationView, animated: true)
331332
}
332333
}

Projects/Presentation/Sources/ResultRecommendedRoutine/View/ResultRecommendedRoutineView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,7 @@ final class ResultRecommendedRoutineView: BaseViewController<ResultRecommendedRo
368368
guard let routineCreationViewModel = DIContainer.shared.resolve(type: RoutineCreationViewModel.self)
369369
else { fatalError("routineCreationViewModel 의존성이 등록되지 않았습니다.") }
370370
let routineCreationView = RoutineCreationView(viewModel: routineCreationViewModel, recommendRoutineId: routineId)
371+
routineCreationView.hidesBottomBarWhenPushed = true
371372
self.navigationController?.pushViewController(routineCreationView, animated: true)
372373
}
373374
}

Projects/Presentation/Sources/RoutineCreation/View/Component/RoutineCreationInputView.swift

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ final class RoutineCreationInputView: UIView {
4949
textField.textColor = .black
5050
textField.font = BitnagilFont.init(style: .body2, weight: .semiBold).font
5151
textField.returnKeyType = .done
52+
textField.addTarget(self, action: #selector(textFieldEditingChanged(_:)), for: .editingChanged)
5253

5354
deleteButton.setImage(BitnagilIcon.deleteIcon, for: .normal)
5455
deleteButton.addAction(
@@ -94,16 +95,13 @@ final class RoutineCreationInputView: UIView {
9495
func configure(title: String) {
9596
textField.text = title
9697
}
97-
}
9898

99-
extension RoutineCreationInputView: UITextFieldDelegate {
100-
func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
101-
if let text = textField.text {
102-
delegate?.routineCreationInputView(self, didChangeText: text)
103-
}
104-
return true
99+
@objc private func textFieldEditingChanged(_ sender: UITextField) {
100+
delegate?.routineCreationInputView(self, didChangeText: sender.text ?? "")
105101
}
102+
}
106103

104+
extension RoutineCreationInputView: UITextFieldDelegate {
107105
func textFieldShouldReturn(_ textField: UITextField) -> Bool {
108106
textField.resignFirstResponder()
109107
return true

Projects/Presentation/Sources/RoutineCreation/ViewModel/RoutineCreationViewModel.swift

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -272,12 +272,7 @@ final class RoutineCreationViewModel: ViewModel {
272272
guard
273273
let name = nameSubject.value,
274274
!name.isEmpty,
275-
executionTimeSubject.value != .none,
276-
weekDaySubject.value.count > 0,
277-
subRoutinesSubject
278-
.value
279-
.map({$0.subRoutineName})
280-
.allSatisfy({$0?.isEmpty == false })
275+
executionTimeSubject.value != .none
281276
else {
282277
checkRoutinePublisher.send(false)
283278
return

SupportingFiles/Info.plist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,7 @@
6262
</dict>
6363
<key>UILaunchStoryboardName</key>
6464
<string>LaunchScreen</string>
65+
<key>UIRequiresFullScreen</key>
66+
<true/>
6567
</dict>
6668
</plist>

0 commit comments

Comments
 (0)