Some Notifications that generates MKMoviePlayer:MPMoviePlayerPlaybackStateDidChangeNotification MPMoviePlayerLoadStateDidChangeNotification
[[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(
playBackStateChanged
:)
name: MPMoviePlayerLoadStateDidChangeNotification object: moviePlayerViewController.moviePlayer];
-(void)playBackStateChanged:(id)sender{
MPMoviePlaybackState playbackState = [moviePlayerViewController.moviePlayer playbackState];
switch (playbackState) {
case MPMoviePlaybackStateStopped :
break;
case MPMoviePlaybackStatePlaying :
[yourActivityIndicatorView stopAnimating];
break;
case MPMoviePlaybackStateInterrupted :
[yourActivityIndicatorView startAnimating];
break;
}
}
So, Questions I ask end up here??
ReplyDelete:)