简体   繁体   English

iPhone应用程序启动屏幕

[英]iPhone App Startup Screen

yet another basic question ... I have an app that takes about 4-5 secs to load. 另一个基本问题...我有一个应用程序需要大约4-5秒的加载时间。

I want to use the time and show a startup screen that 我想用时间显示启动屏幕

  • is visible at least for 4 seconds, and 至少可见4秒钟,并且
  • shows until the app is loaded and ready to show 会显示直到应用程序加载并准备显示

How can I build that into my app? 如何将其内置到我的应用程序中?

Default.png is just the starting point. Default.png只是起点。 That will give you a splash screen (the Apple user interface guidelines suggest that the splash screen should look like the first screen to make the app look as if its loading faster - but that's actually a bad user experience IMHO). 这将为您提供一个初始屏幕(Apple用户界面指南建议该初始屏幕应看起来像第一个使应用程序看起来加载速度更快的屏幕,但这实际上是糟糕的用户体验恕我直言)。

The splash screen disappears as soon as the first view is shown. 显示第一个视图后,启动屏幕即消失。 However, if your code is still doing stuff that renders the interface unusable, it can be worthwhile to make your first view look like the splash screen, possibly adding a progress bar, then swap that out for the first real view when your app is actually ready for user input. 但是,如果您的代码仍在执行某些操作,使界面无法使用,则有必要让您的第一个视图看起来像初始屏幕,可能会添加一个进度条,然后在您的应用程序实际使用时将其替换为第一个真实视图准备好供用户输入。

Looks like a job for Default.png 看起来像是Default.png的工作

http://iosdevelopertips.com/cocoa/defaultpng-the-secret-of-the-load-screen.html http://iosdevelopertips.com/cocoa/defaultpng-the-secret-of-the-load-screen.html

Don't forget to be careful of your capitalization. 不要忘记小心大写。

Have your application start with a view that shows the initialization progress and after the initialization is complete, replace it with your app's main view. 让您的应用程序从一个显示初始化进度的视图开始,并在初始化完成后,将其替换为应用程序的主视图。 Make sure to defer the initialization step with -performSelector:afterDelay or place the initialization code in -applicationDidFinishLaunching , so that the Default.png doesn't show up but for a very small amount of time and you can show your progress view. 确保使用-performSelector:afterDelay延迟初始化步骤,或将初始化代码放置在-applicationDidFinishLaunching ,以使Default.png不会显示,但只显示一小段时间,您可以显示进度视图。

Refer to this StackOverflow question . 请参阅此StackOverflow问题 However, if your app takes 4-5 seconds to load, I would focus on improving its performance. 但是,如果您的应用需要4-5秒的加载时间,我将集中精力改善其性能。 Can you do some operations later, rather than at startup? 您可以稍后而不是在启动时进行一些操作吗? Splash screens are generally a bad user experience and are discouraged in the Apple Human Interface Guidelines . 启动屏幕通常是不好的用户体验, 在Apple人机界面指南不建议使用

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM