2
我有一個關於voiceOver或其他功能讀取文本大聲的問題。 我做了一個應用程序,您可以通過藍牙從控制器獲取LiveData。 如果出現錯誤或警告,它將顯示在屏幕上。應用程序讀取文本?
現在是我的問題,有沒有一種方式,應用程序讀出錯誤或警告,如果出現在iPhone上儘快?
也許認識一個人,如果有可能做到這一點?
我希望你能幫助我;) 最好的問候。
編輯: AVSpeechSynthesizer是完美的答案:) 這裏我的示例代碼:
AVSpeechSynthesizer *synthesizer = [[AVSpeechSynthesizer alloc]init];
AVSpeechUtterance *utterance = [AVSpeechUtterance speechUtteranceWithString:@"Warning: Test Test Test"];
[utterance setRate:0.3f];
[synthesizer speakUtterance:utterance];
就在這個小的代碼,並添加 「AVFoundation.framework」。
謝謝:)我會看看文檔。 – user2918919