AVSpeechSynthesizer not presenting new view controller upon completion

53 views Asked by At

I've implemented AVSpeechSynthesizer in a project of mine. The code works until it gets to the synthesizer's didFinishSpeechUtterance delegate method. Now, I'm not sure if it's being called or not. It's possible that it is being called, but my code for presenting a new view controller upon the utterance's completion isn't correctly written within the delegate method. I know my code for presenting a new view controller is correct, because it works everywhere else, except here. Any ideas?

-(void)speechSynthesizer:(AVSpeechSynthesizer *)synthesizer didFinishSpeechUtterance:(AVSpeechUtterance *)utterance{

InfoGreetView *displayGuestMessageView = [self.storyboard instantiateViewControllerWithIdentifier:@"guestMessageView"];
displayGuestMessageView.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self presentViewController:displayGuestMessageView animated:YES completion:nil]; }
0

There are 0 answers