Skip to content

Commit 8cf1af4

Browse files
committed
[Feat] #263 - 코스 이름 수정 시 이름 뜨도록 수정
1 parent 6470493 commit 8cf1af4

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

Runnect-iOS/Runnect-iOS/Global/UIComponents/CustomBottomSheetVC.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ final class CustomBottomSheetVC: UIViewController {
2323

2424
var backgroundTapAction: (() -> Void)?
2525
var completeButtonTapAction: ((String) -> Void)?
26+
var courseName: String?
2627

2728
private let titleNameMaxLength = 20
2829
private let bottomHeight: CGFloat = 206
@@ -142,6 +143,12 @@ extension CustomBottomSheetVC {
142143
backgroundView.snp.makeConstraints {
143144
$0.edges.equalToSuperview()
144145
}
146+
147+
if let courseName = self.courseName {
148+
self.bottomSheetTextField.text = courseName
149+
self.completeButton.isEnabled = true
150+
self.changeTextFieldLayerColor(true)
151+
}
145152
}
146153

147154
private func setLayout(_ type: SheetType) {

Runnect-iOS/Runnect-iOS/Presentation/Running/VC/RunningWaitingVC.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,7 @@ extension RunningWaitingVC {
389389
private func ModifyCourseTitle() {
390390
let bottomSheetVC = CustomBottomSheetVC(type: .textField)
391391
bottomSheetVC.modalPresentationStyle = .overFullScreen
392+
bottomSheetVC.courseName = self.courseTitle
392393
bottomSheetVC.completeButtonTapAction = { [weak self] text in
393394
guard let self = self else { return }
394395
guard handleVisitor() else { return }

0 commit comments

Comments
 (0)