2010-03-19 75 views

回答

4

如果你问的是一个受制裁的App Store应用程序,那么不能,你不能使用除静态Default.png之外的任何内容。

如果你正在为越狱手机编写应用程序,这可能是可能的(但我不知道)。

+0

我是一名iPhone开发人员,我想在应用程序启动时播放Gif动画。这就是我想要做的 – 2010-03-19 04:36:10

+0

您可以将Default.png文件设置为动画的第一帧,然后在应用程序准备就绪后再播放动画。 – csano 2011-05-12 17:12:01

0

不幸的是,在最新的iPhone操作系统上做这件事是不可能的。使用符号链接的技巧目前被操作系统阻止。

1

下面的代码应该进来 - (BOOL)申请:(UIApplication的*)应用程序didFinishLaunchingWithOptions:(NSDictionary的*)launchOptions

NSBundle *bundle = [NSBundle mainBundle]; 
if(bundle != nil) 
{ 
    NSString *videoPath = [bundle pathForResource:@"trail_video" ofType:@"mp4"]; 
    if (moviePath) 
    { 
     videoURL = [NSURL fileURLWithPath:moviePath]; 
    } 
} 

theMovie = [[MPMoviePlayerViewController alloc] initWithContentURL:videoURL]; 

theMovie.moviePlayer.controlStyle = MPMovieControlStyleNone; 
theMovie.moviePlayer.scalingMode = MPMovieScalingModeFill; 

[[NSNotificationCenter defaultCenter] addObserver:self 
             selector:@selector(moviePlayerDidFinish:) 
              name:MPMoviePlayerPlaybackDidFinishNotification 
              object:theMovie.moviePlayer]; 

[theMovie.moviePlayer setFullscreen:YES animated:NO]; 
[theMovie.moviePlayer prepareToPlay]; 
[theMovie.moviePlayer play]; 
window.rootViewController = theMovie; 
[self.window.rootViewController.view bringSubviewToFront:mMoviePlayer.moviePlayer.view]; 

在moviePlayerDidFinish方法加载你的愿望加载屏幕。