| | |
| | | private var playAtIndex:IndexPath? |
| | | private var tempPlayer:AVPlayer? |
| | | private var isPlaying:Bool = false |
| | | private var needPopRoot = false |
| | | |
| | | override func viewDidDisappear(_ animated: Bool) { |
| | | super.viewDidDisappear(animated) |
| | |
| | | override func viewDidLoad() { |
| | | super.viewDidLoad() |
| | | title = "心泉·疗愈" |
| | | |
| | | yy_popBlock = { [weak self] in |
| | | if self?.needPopRoot ?? false{ |
| | | NotificationCenter.default.post(name: PlantGuideQuit_Noti, object: nil, userInfo: nil) |
| | | }else{ |
| | | self?.navigationController?.popViewController(animated: true) |
| | | } |
| | | } |
| | | |
| | | slider_voice.isEnabled = false |
| | | slider_voice.value = Float(settingModel?.volume ?? 0.5) |
| | |
| | | UserDefaultSettingViewModel.saveSetting(settingModel!) |
| | | audioPlayer.playSceneAt(items[index.row].audioFile) |
| | | alertSuccess(msg: "设置成功") |
| | | needPopRoot = true |
| | | NotificationCenter.default.post(name: SetBGMSuccess_Noti, object: items[index.row]) |
| | | DispatchQueue.main.asyncAfter(delay: 0.6) { |
| | | self.navigationController?.popViewController() |
| | | } |
| | | } |
| | | } |
| | | |