|  | @@ -79,9 +79,9 @@ class BFChooseMusicView: UIView {
 | 
											
												
													
														|  |      // 音乐类别
 |  |      // 音乐类别
 | 
											
												
													
														|  |      var categories = [MusicCategoryModel]()
 |  |      var categories = [MusicCategoryModel]()
 | 
											
												
													
														|  |      
 |  |      
 | 
											
												
													
														|  | -    var musicVolume = 0.0 {
 |  | 
 | 
											
												
													
														|  | 
 |  | +    var musicVolume = 0 {
 | 
											
												
													
														|  |          didSet{
 |  |          didSet{
 | 
											
												
													
														|  | -            slidV.value = Float(musicVolume)
 |  | 
 | 
											
												
													
														|  | 
 |  | +            slidV.value = Float(musicVolume) / 100.0
 | 
											
												
													
														|  |              uiForChangeVolume()
 |  |              uiForChangeVolume()
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
										
											
												
													
														|  | @@ -230,7 +230,7 @@ class BFChooseMusicView: UIView {
 | 
											
												
													
														|  |          progressL.frame = CGRect(x: slidV.x - 7, y: slidV.y - 24, width: 36, height: 16)
 |  |          progressL.frame = CGRect(x: slidV.x - 7, y: slidV.y - 24, width: 36, height: 16)
 | 
											
												
													
														|  |          addSubview(progressL)
 |  |          addSubview(progressL)
 | 
											
												
													
														|  |          
 |  |          
 | 
											
												
													
														|  | -        self.musicVolume = 0.2
 |  | 
 | 
											
												
													
														|  | 
 |  | +        self.musicVolume = 20
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          loadedTimeRangesObserver = player.observe(\AVPlayer.currentItem?.loadedTimeRanges, options: [.new, .initial]) { [weak self] (player, change) in
 |  |          loadedTimeRangesObserver = player.observe(\AVPlayer.currentItem?.loadedTimeRanges, options: [.new, .initial]) { [weak self] (player, change) in
 | 
											
												
													
														|  |              
 |  |              
 | 
											
										
											
												
													
														|  | @@ -350,20 +350,19 @@ class BFChooseMusicView: UIView {
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |      
 |  |      
 | 
											
												
													
														|  |      @objc func valuChange(slid:UISlider) {
 |  |      @objc func valuChange(slid:UISlider) {
 | 
											
												
													
														|  | -        musicVolume = Double(slid.value)
 |  | 
 | 
											
												
													
														|  | 
 |  | +        musicVolume = Int(slid.value * 100)
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |      
 |  |      
 | 
											
												
													
														|  |      func uiForChangeVolume() {
 |  |      func uiForChangeVolume() {
 | 
											
												
													
														|  | -        let num = (Int)(musicVolume * 100)
 |  | 
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -        progressL.text = String(format: "%d%%", num)
 |  | 
 | 
											
												
													
														|  | 
 |  | +        progressL.text = String(format: "%d%%", musicVolume)
 | 
											
												
													
														|  |          
 |  |          
 | 
											
												
													
														|  |          var frame = progressL.frame
 |  |          var frame = progressL.frame
 | 
											
												
													
														|  | -        frame.origin.x = slidV.x - 7 + ((slidV.width - 28) / 100.0) * CGFloat(num)
 |  | 
 | 
											
												
													
														|  | 
 |  | +        frame.origin.x = slidV.x - 7 + ((slidV.width - 28) / 100.0) * CGFloat(musicVolume)
 | 
											
												
													
														|  |          progressL.frame = frame
 |  |          progressL.frame = frame
 | 
											
												
													
														|  |          
 |  |          
 | 
											
												
													
														|  | -        player.volume = Float(musicVolume)
 |  | 
 | 
											
												
													
														|  | -        chosedMusic?.volume = num
 |  | 
 | 
											
												
													
														|  | 
 |  | +        player.volume = Float(musicVolume) / 100.0
 | 
											
												
													
														|  | 
 |  | +        chosedMusic?.volume = musicVolume
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |      
 |  |      
 | 
											
										
											
												
													
														|  | @@ -383,7 +382,7 @@ class BFChooseMusicView: UIView {
 | 
											
												
													
														|  |          player.pause()
 |  |          player.pause()
 | 
											
												
													
														|  |   
 |  |   
 | 
											
												
													
														|  |          choseCell()?.status = .pause
 |  |          choseCell()?.status = .pause
 | 
											
												
													
														|  | -        
 |  | 
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |          switch btn.tag{
 |  |          switch btn.tag{
 | 
											
												
													
														|  |          case 1001:
 |  |          case 1001:
 | 
											
												
													
														|  |              clickBtnAction?(.cancle)
 |  |              clickBtnAction?(.cancle)
 | 
											
										
											
												
													
														|  | @@ -438,6 +437,7 @@ extension BFChooseMusicView:UITableViewDelegate, UITableViewDataSource {
 | 
											
												
													
														|  |                  chosedIndexPath = indexPath
 |  |                  chosedIndexPath = indexPath
 | 
											
												
													
														|  |                  chosedMusic = cell.data
 |  |                  chosedMusic = cell.data
 | 
											
												
													
														|  |                  cell.status = chosedCellStatu
 |  |                  cell.status = chosedCellStatu
 | 
											
												
													
														|  | 
 |  | +                tableView.selectRow(at: indexPath, animated: false, scrollPosition: UITableView.ScrollPosition.none)
 | 
											
												
													
														|  |              }else{
 |  |              }else{
 | 
											
												
													
														|  |                  cell.status = .normal
 |  |                  cell.status = .normal
 | 
											
												
													
														|  |              }
 |  |              }
 | 
											
										
											
												
													
														|  | @@ -472,6 +472,7 @@ extension BFChooseMusicView:UITableViewDelegate, UITableViewDataSource {
 | 
											
												
													
														|  |              
 |  |              
 | 
											
												
													
														|  |              chosedMusic?.isSelected = false
 |  |              chosedMusic?.isSelected = false
 | 
											
												
													
														|  |              chosedMusic = cell.data
 |  |              chosedMusic = cell.data
 | 
											
												
													
														|  | 
 |  | +            chosedMusic?.volume = musicVolume
 | 
											
												
													
														|  |              cell.changeSelected(true)
 |  |              cell.changeSelected(true)
 | 
											
												
													
														|  |              
 |  |              
 | 
											
												
													
														|  |              chosedIndexPath = indexPath
 |  |              chosedIndexPath = indexPath
 |