diff --git a/Controller/SoundsViewController.swift b/Controller/SoundsViewController.swift index 9f90242..3e54e9c 100644 --- a/Controller/SoundsViewController.swift +++ b/Controller/SoundsViewController.swift @@ -60,7 +60,6 @@ class SoundsViewController: BaseViewController { } return cell } - } titleForHeaderInSection: { dataSource, section in return dataSource[section].model } canEditRowAtIndexPath: { dataSource, indexPath in @@ -176,7 +175,7 @@ extension SoundsViewController: UIDocumentPickerDelegate { let documentPicker = UIDocumentPickerViewController(forOpeningContentTypes: types) documentPicker.delegate = self documentPicker.allowsMultipleSelection = false - documentPicker.modalPresentationStyle = .formSheet + documentPicker.modalPresentationStyle = .pageSheet self.present(documentPicker, animated: true, completion: nil) } else { self.showSnackbar(text: "Requires iOS 14") diff --git a/Controller/SoundsViewModel.swift b/Controller/SoundsViewModel.swift index e61a8ab..7d7d699 100644 --- a/Controller/SoundsViewModel.swift +++ b/Controller/SoundsViewModel.swift @@ -34,6 +34,7 @@ class SoundsViewModel: ViewModel, ViewModelType { var soundSelected: Driver /// 铃声导入 var importSound: Driver + /// 删除铃声 var soundDeleted: Driver } @@ -48,7 +49,7 @@ class SoundsViewModel: ViewModel, ViewModelType { var pickerFile: Driver } - /// 将铃声URL转换成 SoundItem + /// 将铃声 URL 转换成 SoundItem func getSounds(urls: [URL]) -> [SoundItem] { let urls = urls.sorted { u1, u2 -> Bool in u1.lastPathComponent.localizedStandardCompare(u2.lastPathComponent) == ComparisonResult.orderedAscending @@ -92,7 +93,7 @@ class SoundsViewModel: ViewModel, ViewModelType { self.dependencies.soundFileStorage.deleteSound(url: model.model.url) }).disposed(by: rx.disposeBag) - // 铃声列表有更新, + // 铃声列表有更新 let soundsListUpdated = Observable.merge( // 刚进页面 Observable.just(()),