| | |
| | | super.awakeFromNib() |
| | | btn_state.alpha = 0 |
| | | view_choose.alpha = 0 |
| | | |
| | | // voicePlayer.playEnd {[weak self] in |
| | | // guard let weakSelf = self else { return } |
| | | // weakSelf.resetView() |
| | | // } |
| | | } |
| | | |
| | | func chooseClouse(callback:@escaping (UIButton)->Void){ |
| | |
| | | |
| | | func resetView(){ |
| | | switch listenType { |
| | | case .lesson1,.lesson5: |
| | | case .lesson1,.lesson5,.game1: |
| | | UIView.animate(withDuration: 0.25) { |
| | | self.btn_state.setImage(UIImage(named: "icon_play"), for: .normal) |
| | | self.btn_voice.alpha = 1 |
| | |
| | | voicePlayer.playerAt(url: v) |
| | | playAtClouse?(self.tag) |
| | | switch listenType { |
| | | case .lesson1,.lesson5: |
| | | case .lesson1,.lesson5,.game1: |
| | | UIView.animate(withDuration: 0.25) { |
| | | self.btn_state.setImage(UIImage(named: "icon_playing"), for: .normal) |
| | | self.btn_voice.alpha = 0 |