зеркало из https://github.com/xamarin/ios-samples.git
set ui elements on the uithread after asking for permission
This commit is contained in:
Родитель
d06dcf0202
Коммит
88f9cab563
|
@ -85,12 +85,17 @@ namespace Sound
|
|||
stopwatch = new Stopwatch ();
|
||||
stopwatch.Start ();
|
||||
|
||||
LengthOfRecordingLabel.Text = string.Empty;
|
||||
RecordingStatusLabel.Text = "Recording";
|
||||
StartRecordingButton.Enabled = false;
|
||||
StopRecordingButton.Enabled = true;
|
||||
PlayRecordedSoundButton.Enabled = false;
|
||||
} else {
|
||||
UIApplication
|
||||
.SharedApplication
|
||||
.BeginInvokeOnMainThread (() => {
|
||||
LengthOfRecordingLabel.Text = string.Empty;
|
||||
RecordingStatusLabel.Text = "Recording";
|
||||
StartRecordingButton.Enabled = false;
|
||||
StopRecordingButton.Enabled = true;
|
||||
PlayRecordedSoundButton.Enabled = false;
|
||||
});
|
||||
|
||||
} else {
|
||||
Console.WriteLine ("YOU MUST ENABLE MICROPHONE PERMISSION");
|
||||
}
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче