From 439a4a12bf524fec2032c396c4301558c7e3e9ac Mon Sep 17 00:00:00 2001 From: Yuriy Holembyovskyy Date: Thu, 9 Nov 2023 12:20:14 +0200 Subject: [PATCH] Fixed issue with UIKitThreadAccess error on ios --- CropperImage.MAUI/CropperImageView.xaml.cs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/CropperImage.MAUI/CropperImageView.xaml.cs b/CropperImage.MAUI/CropperImageView.xaml.cs index d87e5f3..04766fe 100644 --- a/CropperImage.MAUI/CropperImageView.xaml.cs +++ b/CropperImage.MAUI/CropperImageView.xaml.cs @@ -394,13 +394,7 @@ public CropperImageView() /// /// Indicates if you want a cropped square image as cropped result /// - public Task CropImageAsync(bool CropRect = false) - { - return Task.Run(async () => - { - var result = await CropImage(CropRect); - }); - } + public Task CropImageAsync(bool CropRect = false) => CropImage(CropRect); /// /// Execute the image crop async. Refresh CroppedImage and CroppedImageBytes properties at ends.