问题描述
我想在前面添加启动画面和前面的acttivity指示符...为此我在Appdelegate.m中添加以下代码
I want to add splash screen in background and acttivity indicator in front...For that aI add following code in Appdelegate.m
splashView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)];
splashView.image = [UIImage imageNamed:@"Default.png"];
acivityindicator = [[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(67, 24, 30, 30)];
acivityindicator.activityIndicatorViewStyle = UIActivityIndicatorViewStyleWhite;
acivityindicator.autoresizingMask = (UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin);
[window addSubview:splashView];
[window addSubview:acivityindicator];
[window makeKeyAndVisible];
[window bringSubviewToFront:acivityindicator];
[acivityindicator startAnimating];
但只有启动画面正在运行.Activityinicator没有出现。我出了什么问题
But Only splash screen is working.Activityinicator does not appear.What wrong with me
推荐答案
您无法向用户按下图标时启动的启动添加任何动画。你可以添加一个default.png,但那是关于它的。设备使用此时间准备您的应用程序以进行启动。
You can't add any animation to the splash that launches when the user presses the icon. You can add a default.png, but that's about it. The device uses this time to prepare your application for launch.
查看其他应用,您会发现创作者通常会在其上放置带有加载字样的图片,或者根本不显示任何内容。另外,请阅读更多细节。
Check out other apps, and you'll see that the creator usually puts a picture with the words loading, on it, or nothing at all. Also, read up on the IOS Human Interface Guidelines for more details.
希望这有助于= D
这篇关于带有activityindicator的闪屏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!