开发者

MPMoviePlayerController Manual loading screen

开发者 https://www.devze.com 2023-03-29 11:35 出处:网络
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 l

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];

  }
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号