Skip to content

Commit

Permalink
fix : viewModel과 bind 코드 위치 수정 (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
k2645 committed Jan 20, 2024
1 parent 696f689 commit a92d90e
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions KCS/KCS/Presentation/Home/View/StoreInformationViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@ final class StoreInformationViewController: UIViewController {
label.translatesAutoresizingMaskIntoConstraints = false
label.font = UIFont.systemFont(ofSize: 15)
label.textColor = UIColor.goodPrice
viewModel.openClosedOutput
.bind { [weak self] openClosedType in
label.text = openClosedType.rawValue
}
.disposed(by: disposeBag)

return label
}()
Expand All @@ -60,11 +55,6 @@ final class StoreInformationViewController: UIViewController {
label.translatesAutoresizingMaskIntoConstraints = false
label.font = UIFont.systemFont(ofSize: 13)
label.textColor = UIColor.kcsGray
viewModel.openingHourOutput
.bind { [weak self] text in
label.text = text
}
.disposed(by: disposeBag)

return label
}()
Expand Down Expand Up @@ -124,6 +114,18 @@ private extension StoreInformationViewController {
self?.storeImageView.image = UIImage(data: data)
})
.disposed(by: disposeBag)

viewModel.openClosedOutput
.bind { [weak self] openClosedType in
self?.storeOpenClosed.text = openClosedType.rawValue
}
.disposed(by: disposeBag)

viewModel.openingHourOutput
.bind { [weak self] text in
self?.openingHour.text = text
}
.disposed(by: disposeBag)
}

func setBackgroundColor() {
Expand Down

0 comments on commit a92d90e

Please sign in to comment.