3

Default.pngの代わりにアニメーション(Gif)またはムービーを再生したい。それは可能ですか?このブログで説明されていることを試しました:http ://www.cuppadev.co.uk/iphone/playing-animated-gifs-on-the-iphone/しかし、デフォルトの代わりにGifアニメーションを再生する方法がわかりません.png

4

3 に答える 3

4

認可されたAppStoreアプリについて質問している場合は、いいえ、静的なDefault.png以外は使用できません。

あなたが脱獄した電話のためのアプリを書いているなら、これは可能かもしれません(しかし私は知りません)。

于 2010-03-19T04:33:30.787 に答える
1

次のコードが含まれるはずです-(BOOL)application:(UIApplication *)application 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メソッドで、ロードしたい画面をロードします。

于 2013-10-15T14:04:03.267 に答える
0

残念ながら、最新のiPhoneOSでそれを行うことは不可能です。シンボリックリンクを使用するトリックは、現在OSによってブロックされています。

于 2010-03-19T08:34:09.630 に答える