Aatish Molasi
Aatish Molasi

Reputation: 2186

Perform UI operations before application goes into background

I would like to perform some UI Operations before an application goes into the background ..

UIApplicationDidEnterBackgroundNotification

just doesn't cut it .. I have a MPMoviePlayerController streaming an m3u8 file and i need to pause this video before the application goes into the background mainly because ..
If i do tap on the home button while the video is playing and come into the foreground again ..

The buffered stream of the video is lost and the video plays in a buggy manner and strangely this happens only on iPhone and not iPad ..
so i am hoping to work around this and pause the video before it goes into the background ..

Upvotes: 0

Views: 309

Answers (2)

w____
w____

Reputation: 3605

The UIApplicationWillResignActiveNotification seems exactly what you're looking for.

ref: http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UIApplication_Class/Reference/Reference.html

Upvotes: 2

superGokuN
superGokuN

Reputation: 1424

Please take a look at this Application Delegate

Or you can even perform task for a finite time after your application enter to background

Check out here

Upvotes: 0

Related Questions