MPMoviePlayerController Manual loading screen
In MPMoviewPlayerController i have to play movie from a particular url.Its work fine.I want to show a 开发者_如何转开发loadingview (like a spinning wheel rotate in the center of the screen with text loading please wait) before it starts playing movie. (I am using ios4.2)
Can anyone help me ?
Thanks a lot.
try this. when u alloc MPMoviePlayerController after that use this method.
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(myMovieFinishedCallback:) name:MPMediaPlaybackIsPreparedToPlayDidChangeNotification object:moviePlayer];
[activity startanimating];
and after that use the delegate method..
-(void)myMovieFinishedCallback:(NSNotification*)aNotification
{
moviePlayer=[aNotification object];
CFShow([aNotification userInfo]);
[activity hide];
[[NSNotificationCenter defaultCenter] removeObserver:self name:MPMediaPlaybackIsPreparedToPlayDidChangeNotification object:moviePlayer];
}
精彩评论