mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Add flip options to the MediaUploadPreview image edit screen
This commit is contained in:
+5
-1
@@ -327,7 +327,11 @@ private struct ImageEditorView: UIViewControllerRepresentable {
|
|||||||
func makeUIViewController(context: Context) -> CropViewController {
|
func makeUIViewController(context: Context) -> CropViewController {
|
||||||
let image = UIImage(contentsOfFile: imageURL.path) ?? UIImage()
|
let image = UIImage(contentsOfFile: imageURL.path) ?? UIImage()
|
||||||
|
|
||||||
let cropViewController = Mantis.cropViewController(image: image)
|
var config = Mantis.Config()
|
||||||
|
let toolbarOptions: ToolbarButtonOptions = [.default, .horizontallyFlip, .verticallyFlip]
|
||||||
|
config.cropToolbarConfig.toolbarButtonOptions = toolbarOptions
|
||||||
|
|
||||||
|
let cropViewController = Mantis.cropViewController(image: image, config: config)
|
||||||
cropViewController.delegate = context.coordinator
|
cropViewController.delegate = context.coordinator
|
||||||
return cropViewController
|
return cropViewController
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user