I want to have an animation in my ipad application. And I read somewhere using imageview animatedImages but I don't want to use this way. Can I use gif files? Or how can I play animations in my application?
Asked
Active
Viewed 593 times
0
-
what type of animation exactly do you want? – Dion Jan 09 '12 at 14:08
-
1What's wrong with using UIImageView's `animationImages`? – DarkDust Jan 09 '12 at 14:09
-
@DRP96 I want to play like a movie in splash screen. is it possible? And if yes how can I do this? – Hacer sengul Akac Jan 09 '12 at 14:18
-
@DarkDust because of my animation like a movie. or Can I use a gif? – Hacer sengul Akac Jan 09 '12 at 14:22
-
@HacersengulAkac Yes thats possbile. Look at my answer. – Dion Jan 09 '12 at 14:22
-
GIF you actually should be able to use too, but a video is always better color quality – Dion Jan 09 '12 at 14:23
-
1) You cannot have an animated splash screen, iOS always shows a static image (which you specify). Or do you want to show an animation right after you gain control on app start (that is, right after the splash screen ?) 2) I have no idea what you mean with "like a movie", but the point of animationImages is that you provides the "frames" of your animation as separate images and they'll get shown one after another. If the timespan between two frames is fast enough you have a fluid animation like a movie. – DarkDust Jan 09 '12 at 15:22
-
@DRP96: The MPMoviePlayer [does not support GIF](http://developer.apple.com/library/IOs/#documentation/MediaPlayer/Reference/MPMoviePlayerController_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40006953-CH3-SW20). – DarkDust Jan 09 '12 at 15:24
-
He didn't say that it must be gif, maybe. – Dion Jan 09 '12 at 15:35
-
@DRP96 I'm confused :S So, Can I use gif for splash screen? ( instead of Default.png ) – Hacer sengul Akac Jan 10 '12 at 07:11
-
For the launching screen I don't think so, Apple says that it should be jpg or even better *.png (recommended). But of course you can try it with .gif but I don't know whether it works or not... – Dion Jan 10 '12 at 15:04
-
possible duplicate of [iPhone/iPad: animated splash screen?](http://stackoverflow.com/questions/6169792/iphone-ipad-animated-splash-screen) – Brad Larson Jan 12 '12 at 16:47
1 Answers
0
MPMoviePlayerController *player = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:url]];
player.view.frame = CGRectMake(184, 200, 400, 300);
[self.view addSubview:player.view];
[player play];
from iPhone SDK:How do you play video inside a view? Rather than fullscreen
-
I said that like a movie but not movie..Like a motion splash image on loading application – Hacer sengul Akac Jan 09 '12 at 14:24
-
1Yeah that could be a little video (maybe 2 seconds?) Thats just a bit better than gif. What exactly do you want to animate? Moving, Scaling? That you could do with Xcode animations. Other things like many color effects/... is better in a video – Dion Jan 09 '12 at 14:27