Yadukrishnan A
Yadukrishnan A

Reputation: 55

Stop speech when app enter foreground

My app stops speaking when enter background and continues speech when entering foreground. I need to stop Speaking when app enters again foreground.

Upvotes: 0

Views: 228

Answers (1)

Shehata Gamal
Shehata Gamal

Reputation: 100543

Implement this delegate method if code is global

- (void)applicationWillEnterForeground:(UIApplication *)application 
{
  /// stop speech

}

or listen to it in your viewController if it's not

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(appWillEnterForeground:) name:UIApplicationWillEnterForegroundNotification object:nil]; 

//

 -(void)applicationWillEnterForeground:(NSNotification *)paramNotification
{



}

Upvotes: 1

Related Questions