yoyo
Jun 29, 2018 - 03:23
My application for iOS has recording function. Based on sample code, I implemented a following code. As you understand, recorder.stop() is executed after alert dialog is closed. I want to change this specification from current one to new one which records a voice while a button on UI is kept touching, and when user releases a finger from a button, recorde.stop() is executed. How should I implement this? I don’t want to use an alert dialog.
recorder = sound.Recorder('speech.m4a')
recorder.record()
# Continue recording until the 'Finish' button is tapped:
dialogs.alert('Recording...','','Finish',hide_cancel_button=True)
recorder.stop()