| | |
| | | |
| | | for (index,titleL) in (self.menu.subviews.last?.subviews[1].subviews ?? []).filter({$0 is UIButton}).enumerated(){ |
| | | if let btn = titleL as? UIButton{ |
| | | btn.setTitleColor(index < (self.limitDay - 1) ? .black:.black.withAlphaComponent(0.33), for: .normal) |
| | | self.menu.setEnabled(index < (self.limitDay - 1), forItemAt: UInt(index)) |
| | | btn.setTitleColor(index < (self.limitDay) ? .black:.black.withAlphaComponent(0.33), for: .normal) |
| | | self.menu.setEnabled(index < (self.limitDay), forItemAt: UInt(index)) |
| | | } |
| | | } |
| | | self.pageVC.reloadData() |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | override func setRx() { |
| | | NotificationCenter.default.rx.notification(StudyCompleteNextLession_Noti).take(until: self.rx.deallocated).subscribe(onNext: {[weak self] noti in |
| | | guard let weakSelf = self else { return } |
| | | if let type = noti.object as? ListenType{ |
| | | let homelistenSubVC = weakSelf.pageVC.currentController as! HomeListenSubVC |
| | | homelistenSubVC.jumpAt(listenType: type) |
| | | } |
| | | |
| | | }).disposed(by: disposeBag) |
| | | } |
| | | } |
| | | |
| | | extension HomeListenVC:SPPageMenuDelegate{ |