gpt4 book ai didi

iphone - 在应用程序委托(delegate)中加载选项卡栏之前播放电影

转载 作者:行者123 更新时间:2023-12-03 21:07:49 25 4
gpt4 key购买 nike

在我的应用程序中,有一个介绍性的启动视频,在用户看到选项卡栏 View 之前播放。添加视频是我最后一刻的决定,因此我的应用程序委托(delegate)当前设置为首先加载标签栏 Controller 。

我尝试通过在应用委托(delegate)中的 application didFinishLaunchingWithOptions 早期添加以下代码来最大程度地减少首先加载视频所需的代码重构量:

[self performSelector:@selector(splashVideo:) withObject:nil afterDelay:0.0];

哪个进入这个方法...

- (void)splashVideo:(id)sender {
url = [[NSBundle mainBundle] URLForResource:@"splashsmall" withExtension:@"m4v"];
moviePlayerController = [[MPMoviePlayerViewController alloc] initWithContentURL:url];
moviePlayerController.moviePlayer.controlStyle = MPMovieControlStyleNone;
[homeViewController presentModalViewController:moviePlayerController animated:NO];
}

这非常有效,尽管有时您仍然可以在视频加载之前看到标签栏 Controller 一瞬间。

我的问题是:是否有一种有保证的方法可以防止标签栏 Controller 在视频播放后可见?我是否必须以某种激烈的方式削减代码?

提前致谢。

最佳答案

根据Apple's Human Interface Guidelines ,如果您在应用程序启动时显示不必要的加载屏幕,您的应用程序可能会被拒绝。

编辑:

你尝试过吗:

tabBarController.view.hidden = YES;

关于iphone - 在应用程序委托(delegate)中加载选项卡栏之前播放电影,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5494992/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com