-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feat] #208 코스업로드 api 연결 #210
The head ref may contain hidden characters: "#208-\uCF54\uC2A4\uC5C5\uB85C\uB4DC"
Changes from all commits
6b29658
70bc4e1
8d3c02b
1034061
f7686b3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
|
||
import UIKit | ||
import Combine | ||
import CombineCocoa | ||
|
||
@frozen | ||
enum SheetType { | ||
|
@@ -25,14 +26,11 @@ final class CustomBottomSheetVC: UIViewController { | |
private var BottomsheetType: SheetType! | ||
|
||
var backgroundTapAction: (() -> Void)? | ||
var completeButtonTapAction: ((String) -> Void)? | ||
|
||
var completeButtonTapped: Driver<Void> { | ||
completeButton.publisher(for: .touchUpInside) | ||
.map { _ in } | ||
.asDriver() | ||
} | ||
Comment on lines
-29
to
-33
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 버튼에 publisher를 연결하는 과정을 combineCocoa를 사용하는 것으로 수정했습니다 |
||
// 바텀 시트 높이 | ||
let bottomHeight: CGFloat = 206 | ||
private var cancelBag = CancelBag() | ||
|
||
// MARK: - UI Components | ||
|
||
|
@@ -91,6 +89,7 @@ final class CustomBottomSheetVC: UIViewController { | |
self.setDelegate() | ||
self.setTapGesture() | ||
self.setAddTarget() | ||
self.setBinding() | ||
if BottomsheetType == .TextField { | ||
showBottomSheet() | ||
setupGestureRecognizer() | ||
|
@@ -244,6 +243,14 @@ extension CustomBottomSheetVC { | |
} | ||
} | ||
|
||
private func setBinding() { | ||
self.completeButton.tapPublisher.sink { [weak self] _ in | ||
guard let self = self else { return } | ||
guard let text = self.bottomSheetTextField.text else { return } | ||
self.completeButtonTapAction?(text) | ||
}.store(in: cancelBag) | ||
Comment on lines
+247
to
+251
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 완성하기 버튼이 눌린 경우는 textfield의 내용을 클로저에 전달해주었습니다 |
||
} | ||
|
||
private func showBottomSheet() { | ||
|
||
let safeAreaHeight: CGFloat = view.safeAreaLayoutGuide.layoutFrame.height | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ struct CourseDrawingRequestDto: Codable { | |
|
||
struct CourseDrawingRequestData: Codable { | ||
let path: [RNLocationModel] | ||
// let title: String | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 서버 배포되면 title 관련 주석 삭제하도록 하겠습니당 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 넵 |
||
let distance: Float | ||
let departureAddress, departureName: String | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -218,8 +218,8 @@ extension DepartureSearchVC: UITableViewDelegate, UITableViewDataSource { | |
let courseDrawingVC = CourseDrawingVC() | ||
|
||
let departureLocationModel = addressList[indexPath.item].toDepartureLocationModel() | ||
courseDrawingVC.setData(model: departureLocationModel) | ||
SelectedInfo.shared.type = .other | ||
courseDrawingVC.setData(model: departureLocationModel) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 순서의 중요성 |
||
|
||
courseDrawingVC.hidesBottomBarWhenPushed = true | ||
self.navigationController?.pushViewController(courseDrawingVC, animated: true) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
굿굿 감사합니다