How to play an animation / movie instead of a splash screen for iPhone?

I want to play an animation (Gif) or movie instead of Default.png. Is it possible? I tried what is described on this blog: http://www.cuppadev.co.uk/iphone/playing-animated-gifs-on-the-iphone/ , but I don’t know how to play Gif animations instead of Default. png

+3
source share
3 answers

If you ask about an authorized App Store application, then no, you cannot use anything other than the static Default.png.

If you're writing a jailbreak phone app, it might be possible (but I don't know).

+4
source

- (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 , .

+1

Unfortunately, this cannot be done on the latest iPhone OS. The symlink trick is currently blocked by the OS.

0
source

Source: https://habr.com/ru/post/1737639/


All Articles