xcode 启动画面后的电影或启动画面作为电影

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10480623/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 00:12:42  来源:igfitidea点击:

Movie after splash screen or splash screen as movie

iphoneobjective-ciosxcode

提问by vishiphone

Is there anyway I can play .mov, .gif or any formats after application launches? any suggestions will do :) or I can use animation in images the load it in 'application didFinishLaunching'. Thanks :)

无论如何我可以在应用程序启动后播放 .mov、.gif 或任何格式吗?任何建议都可以:) 或者我可以在图像中使用动画并将其加载到“应用程序 didFinishLaunching”中。谢谢 :)

回答by vishiphone

add this in your appDelegate.m file

将此添加到您的 appDelegate.m 文件中

  -(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
 {
     [viewController showSplash];

 }

add this in your view controller.m file

将此添加到您的视图 controller.m 文件中

 -(void)showSplash
 {
     UIViewController *modalViewController = [[UIViewController alloc] init];
     modalViewController.view = //here you use your video file
     [self presentModalViewController:modalViewController animated:NO];

  }
 - (IBAction)hideSplash
  {
      [[self modalViewController] dismissModalViewControllerAnimated:YES];

  }

Try this and inform us it will be helpful for you or not;

试试这个并告诉我们它是否对您有帮助;

回答by Titouan de Bailleul

Again, I just googled 'video splashscreen objective-c', and I found these :

再一次,我只是在谷歌上搜索了“视频闪屏目标 c”,我发现了这些:

Add a video into splash screen or in the first view of the app (IOS xcode 4.0)

将视频添加到启动画面或应用程序的第一个视图中(IOS xcode 4.0)

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

如何播放动画/电影而不是 iPhone 启动画面?

iPhone - Showing video as a splash screen

iPhone - 将视频显示为启动画面

And I think you can find more about this topic, it is a really common one.

而且我认为您可以找到有关此主题的更多信息,这是一个非常常见的主题。