Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ final class AdminBottomSheetViewController: BaseViewController, View {

// MARK: - Initialization
init(reactor: AdminBottomSheetReactor) {
super.init() // BaseViewController์˜ init() ํ˜ธ์ถœ
super.init()
self.reactor = reactor
}
required init?(coder: NSCoder) {
Expand All @@ -43,9 +43,7 @@ final class AdminBottomSheetViewController: BaseViewController, View {
view.backgroundColor = .clear

Logger.log(message: "์ดˆ๊ธฐ ๋ทฐ ๊ณ„์ธต:", category: .debug)
// print(view.value(forKey: "recursiveDescription") ?? "")

// mainView ์„ค์ • ๋ฐ ์ถ”๊ฐ€
view.addSubview(mainView)
mainView.isUserInteractionEnabled = true
mainView.containerView.isUserInteractionEnabled = true
Expand All @@ -60,24 +58,21 @@ final class AdminBottomSheetViewController: BaseViewController, View {
}

Logger.log(message: "mainView ์ถ”๊ฐ€ ํ›„ ๊ณ„์ธต:", category: .debug)
// print(view.value(forKey: "recursiveDescription") ?? "")

// dimmedView ์„ค์ • ๋ฐ ์ถ”๊ฐ€
dimmedView.backgroundColor = .black.withAlphaComponent(0.4)
dimmedView.alpha = 0
dimmedView.isUserInteractionEnabled = true
dimmedView.isUserInteractionEnabled = false

let tapGesture = UITapGestureRecognizer(target: self, action: #selector(dimmedViewTapped))
dimmedView.addGestureRecognizer(tapGesture)
tapGesture.cancelsTouchesInView = false // ํ„ฐ์น˜ ์ด๋ฒคํŠธ๊ฐ€ ๋‹ค๋ฅธ ๋ทฐ๋กœ ์ „๋‹ฌ๋˜๋„๋ก ์„ค์ •
tapGesture.cancelsTouchesInView = true // ํ„ฐ์น˜ ์ด๋ฒคํŠธ๊ฐ€ ๋‹ค๋ฅธ ๋ทฐ๋กœ ์ „๋‹ฌ๋˜๋„๋ก ์„ค์ •
view.insertSubview(dimmedView, belowSubview: mainView)

dimmedView.snp.makeConstraints { make in
make.edges.equalToSuperview()
}

Logger.log(message: "์ตœ์ข… ๋ทฐ ๊ณ„์ธต:", category: .debug)
// print(view.value(forKey: "recursiveDescription") ?? "")
}

private func setupCollectionView() {
Expand All @@ -89,12 +84,8 @@ final class AdminBottomSheetViewController: BaseViewController, View {

// MARK: - Binding
func bind(reactor: Reactor) {
// Action
mainView.segmentedControl.rx.selectedSegmentIndex
.do(onNext: { index in
Logger.log(message: "์„ธ๊ทธ๋จผํŠธ ๋ณ€๊ฒฝ ์‹œ๋„: \(index)", category: .event)
Logger.log(message: "View ์ƒํƒœ: \(self.view.window != nil)", category: .debug)
Logger.log(message: "MainView ์ƒํƒœ: \(self.mainView.window != nil)", category: .debug)
})
.map { Reactor.Action.segmentChanged($0) }
.bind(to: reactor.action)
Expand All @@ -118,7 +109,6 @@ final class AdminBottomSheetViewController: BaseViewController, View {
.bind(to: reactor.action)
.disposed(by: disposeBag)

// State
reactor.state.map { state in
let items = state.activeSegment == 0 ?
state.statusOptions :
Expand Down
1 change: 0 additions & 1 deletion Poppool/Poppool/Presentation/Admin/AdminReactor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ final class AdminReactor: Reactor {
return .just(.navigateToRegister(true))

case let .tapEditButton(storeId):
// โœ… ์„ ํƒํ•œ storeId์— ํ•ด๋‹นํ•˜๋Š” ๋ฐ์ดํ„ฐ๋ฅผ ์ฐพ์•„์„œ Mutation์œผ๋กœ ์ „๋‹ฌ
if let store = currentState.storeList.first(where: { $0.id == storeId }) {
return .just(.navigateToEdit(store))
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,6 @@ final class AdminViewController: BaseViewController, View {

// MARK: - Reactor Binding
func bind(reactor: Reactor) {
// Search input
mainView.searchInput.rx.text.orEmpty
.distinctUntilChanged()
.debounce(.milliseconds(300), scheduler: MainScheduler.instance)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ struct StoreListRequestDTO: Encodable {

enum CodingKeys: String, CodingKey {
case query
case page = "pageable.page"
case size = "pageable.size"
case page
case size
}
}

Expand All @@ -31,7 +31,6 @@ struct CreatePopUpStoreRequestDTO: Encodable {
let markerSnippet: String
let startDateBeforeEndDate: Bool

/// - ๋งŒ์•ฝ ๋Œ€ํ‘œ ์ด๋ฏธ์ง€ URL(mainImageUrl)์ด ๋น„์–ด ์žˆ์ง€ ์•Š๋‹ค๋ฉด ๋ฐฐ๋„ˆ ์ด๋ฏธ์ง€๋กœ ๊ฐ„์ฃผํ•˜์—ฌ bannerYn์„ true๋กœ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.
init(name: String,
categoryId: Int64,
desc: String,
Expand Down
16 changes: 8 additions & 8 deletions Poppool/Poppool/Presentation/Map/MapSearchInput.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ final class MapSearchInput: UIView, View {
init() {
super.init(frame: .zero)
setupLayout()
setupActions()
// setupActions()
// setupGesture()
searchTextField.isEnabled = false


Expand All @@ -79,12 +80,12 @@ final class MapSearchInput: UIView, View {

func bind(reactor: MapReactor) {
// ์—”ํ„ฐ ํ‚ค๋กœ ๊ฒ€์ƒ‰ ์‹คํ–‰
searchTextField.rx.controlEvent(.editingDidEndOnExit)
.withLatestFrom(searchTextField.rx.text.orEmpty)
.bind { query in
reactor.action.onNext(.searchTapped(query))
}
.disposed(by: disposeBag)
// searchTextField.rx.controlEvent(.editingDidEndOnExit)
// .withLatestFrom(searchTextField.rx.text.orEmpty)
// .bind { query in
// reactor.action.onNext(.searchTapped(query))
// }
// .disposed(by: disposeBag)

// ํ…์ŠคํŠธ ์ž…๋ ฅ ๋กœ๊ทธ
searchTextField.rx.text.orEmpty
Expand Down Expand Up @@ -138,7 +139,6 @@ private extension MapSearchInput {
}

func setupActions() {
// ํ…์ŠคํŠธ ํ•„๋“œ ์•ก์…˜ ์„ค์ •
searchTextField.rx.controlEvent(.editingDidEndOnExit)
.withLatestFrom(searchTextField.rx.text.orEmpty)
.subscribe(onNext: { [weak self] query in
Expand Down
Loading