Replies: 2 comments 4 replies
-
You have to supply more information on the repro steps and the iOS device you're testing on. |
Beta Was this translation helpful? Give feedback.
2 replies
-
I think both your description and your code highlights a reentrant problem of your code. A simple solution would be set <Grid VerticalOptions="End" RowDefinitions="30">
<Button x:Name="CaptureButton" Grid.Row="1" Clicked="Button_OnClicked" Height="100" Width="100" Text="拍照"></Button>
</Grid> private async void CameraView_OnMediaCaptured(object? sender, MediaCapturedEventArgs e)
{
var uuid=await Utils.GetAverageHash(e.Media);
Console.WriteLine(uuid);
CaptureButton.IsEnabled = true;
}
private void Button_OnClicked(object? sender, EventArgs e)
{
CaptureButton.IsEnabled = false;
Camera.CaptureImage(new CancellationTokenSource().Token);
} |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Will cause the program to automatically exit, iOS
Beta Was this translation helpful? Give feedback.
All reactions