iOS 动画启动画面
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12913444/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
iOS Animated Splash Screen
提问by CodeGeek123
Is it possible to add an .fla file as splash screen in iOS development? If not what are the other formats of animated files does a splash screen accept? Does it accept animated gifs? or .swf files? or do i have to write the animation frame by frame.
是否可以在 iOS 开发中添加 .fla 文件作为启动画面?如果不是,启动画面接受哪些其他格式的动画文件?它接受动画 gif 吗?或 .swf 文件?还是我必须逐帧编写动画。
If so what is the procedure? Do i have to add it the same way i add an image just have the extension differ?
如果是这样,程序是什么?我是否必须以与添加图像相同的方式添加它,只是扩展名不同?
I have an .fla file that i would like to add to my code. Unfortunately i couldn't find any material on whether this is feasible or not.
我有一个 .fla 文件,我想将其添加到我的代码中。不幸的是,我找不到任何关于这是否可行的材料。
回答by jcesarmobile
Seems like people here doesn't know the difference between splash screen and launch image. Launch images are static, you configure them with xcode and you can't change them.
似乎这里的人不知道启动画面和启动图像之间的区别。启动图像是静态的,您可以使用 xcode 配置它们并且无法更改它们。
But in a splash screen you can do whatever you like, it's just a viewController where you show an animation, a video, or any other thing.
You show the splass screen after the launch image and before your "landing page".
Then, in a splash screen you can create an animation frame by frame, or load a .mp4 video in a MPMoviePlayerController
as Krumelur said.
但是在启动画面中,您可以做任何您喜欢的事情,它只是一个视图控制器,您可以在其中显示动画、视频或任何其他内容。您在启动图像之后和“登陆页面”之前显示了电子屏幕。然后,在启动画面中,您可以逐帧创建动画,或者MPMoviePlayerController
像 Krumelur 所说的那样在 a 中加载 .mp4 视频。
People using animated splash screens, usually use a launch image with the color of the splash screen (color of the first animation frame or the color of the video), so it seems that the launch image is part of the splass screen.
使用动画闪屏的人,通常使用带有闪屏颜色(第一个动画帧的颜色或视频的颜色)的启动图像,因此启动图像似乎是闪屏的一部分。
回答by Krumelur
It is relatively easy to create an animated splash screen. You need to create a compliant .mp4 file on and use the first frame of this movie as the launch image. Then instantiate a MPMoviePlayerController
on app launch to play the movie in full screen. The movie will start a few moments after the launch image has been shown.
创建动画闪屏相对容易。您需要创建一个兼容的 .mp4 文件并使用这部电影的第一帧作为启动图像。然后MPMoviePlayerController
在应用程序启动时实例化以全屏播放电影。电影将在显示启动图像后片刻开始。
回答by MPG
Doesn't look like possible. You may want to have a look of following post dynamic splash screens
看起来不太可能。您可能想看看以下 动态启动画面
You have to write the animation frame by frame.
您必须逐帧编写动画。
Another guide for animating splash screen Animation on splash screen
Hence you will have to show splash screen and then you may add any animation on view or add any movie(for example: .mov)
因此,您必须显示启动画面,然后您可以在视图中添加任何动画或添加任何电影(例如:.mov)
Hope this will help!!
希望这会有所帮助!!
回答by Eduardo
You cannot display .fla files on iOS. Flash is not allowed as content in iOS. Also, splash screens can only be static graphics.
您无法在 iOS 上显示 .fla 文件。Flash 不允许作为 iOS 中的内容。此外,启动画面只能是静态图形。
回答by Pierre
An iOS splash screen is static. So it's just an image. But you can add your splashscreen and then just add a movie (.mov or other Apple format) just after your splashscreen disappears.
iOS 启动画面是静态的。所以它只是一个图像。但是您可以添加启动画面,然后在启动画面消失后添加电影(.mov 或其他 Apple 格式)。