|
@@ -37,8 +37,8 @@ class TSPhotoPickerManager: NSObject {
|
|
|
var picker: PhotoPickerController?
|
|
|
lazy var multipleConfig: PickerConfiguration = {
|
|
|
var config = PickerConfiguration()
|
|
|
- config.modalPresentationStyle = .automatic
|
|
|
-// config.modalPresentationStyle = .fullScreen
|
|
|
+// config.modalPresentationStyle = .automatic
|
|
|
+ config.modalPresentationStyle = .overFullScreen
|
|
|
config.themeColor = .themeColor
|
|
|
config.selectOptions = .photo
|
|
|
config.selectMode = .multiple
|
|
@@ -57,15 +57,22 @@ class TSPhotoPickerManager: NSObject {
|
|
|
|
|
|
config.navigationBarStyle = .black
|
|
|
|
|
|
- config.photoSelectionTapAction = .quickSelect
|
|
|
- config.photoList.bottomView.isHiddenPreviewButton = true
|
|
|
- config.photoList.bottomView.isShowSelectedView = false
|
|
|
+// config.photoSelectionTapAction = .quickSelect
|
|
|
+// config.photoList.bottomView.isHiddenPreviewButton = true
|
|
|
+// config.photoList.bottomView.isShowSelectedView = false
|
|
|
+
|
|
|
+ config.photoSelectionTapAction = .preview
|
|
|
+ config.photoList.bottomView.isHiddenPreviewButton = false
|
|
|
+ config.photoList.bottomView.isShowSelectedView = true
|
|
|
+ config.photoList.previewStyle = .push
|
|
|
+
|
|
|
+// let cropSize = EditorConfiguration.ToolsView.Options(
|
|
|
+// imageType: HX.ImageResource.ImageType,
|
|
|
+// type: .cropSize
|
|
|
+// )
|
|
|
+// config.editor.toolsView = .init(toolOptions: [cropSize])
|
|
|
+// config.editor.toolsView.toolOptions = [EditorConfiguration.ToolsView.Options.cropSize]
|
|
|
|
|
|
-// config.photoSelectionTapAction = .preview
|
|
|
-// config.photoList.bottomView.isHiddenPreviewButton = false
|
|
|
-// config.photoList.bottomView.isShowSelectedView = true
|
|
|
-// config.photoList.previewStyle = .present
|
|
|
-
|
|
|
var cameraConfig = SystemCameraConfiguration()
|
|
|
cameraConfig.allowsEditing = false
|
|
|
config.appearanceStyle = .dark
|
|
@@ -168,6 +175,7 @@ extension TSPhotoPickerManager: PhotoPickerControllerDelegate {
|
|
|
func pickerController(_ pickerController: PhotoPickerController, didFinishSelection result: PickerResult) {
|
|
|
result.getImage(compressionScale: 1.0) { images in
|
|
|
self.completionHandler?(images)
|
|
|
+ pickerController.dismiss(animated: true, completion: nil)
|
|
|
}
|
|
|
}
|
|
|
|