| | |
| | | import RxSwift |
| | | import RxRelay |
| | | |
| | | let CourseExercise_Noti = Notification.Name.init("CourseExercise_Noti") |
| | | |
| | | class CourseExerciseViewModel:RefreshModel<ExerciseVideoModel>{ |
| | | let courseTypeId = BehaviorRelay<Int?>(value: nil) |
| | | let search = BehaviorRelay<String>(value: "") |
| | |
| | | // tableView.jq_setEmptyView() |
| | | } |
| | | |
| | | override func setRx() { |
| | | NotificationCenter.default.rx.notification(CourseExercise_Noti).take(until: self.rx.deallocated).subscribe(onNext: {[weak self] noti in |
| | | self?.viewModel.beginRefresh() |
| | | }).disposed(by: disposeBag) |
| | | } |
| | | |
| | | |
| | | @IBAction func searchAction(_ sender: UIButton) { |
| | | tf_search.resignFirstResponder() |