开发者

Can I display the launch image every time my app goes into foreground?

For my app, in xcode 4 I set a png for my launch 开发者_运维问答image (in target)...but it appear only when I start app first time; is it possible to appear this launch image every time? Also when I put my app in background and I don't kill it. Is it possible?


Even if quite some apps have them, there should not be a splash screen at all. Apple is clear about this in their Human Interface Guidelines:

To enhance the user’s experience at application launch, you must provide at least one launch image. A launch image looks very similar to the first screen your application displays. iOS displays this image instantly when the user starts your application and until the app is fully ready to use. As soon as your app is ready for use, your app displays its first screen, replacing the launch placeholder image.

Supply a launch image to improve user experience.

Avoid using it as an opportunity to provide:

An “application entry experience,” such as a splash screen An About window Branding elements, unless they are a static part of your application’s first screen Because users are likely to switch among applications frequently, you should make every effort to cut launch time to a minimum, and you should design a launch image that downplays the experience rather than drawing attention to it.

Generally, design a launch image that is identical to the first screen of the application.

To answer your question: You can implement the UIApplication delegate to take actions when your app did become active or will enter foreground:

- (void)applicationDidBecomeActive:(UIApplication *)application {

}


- (void)applicationWillEnterForeground:(UIApplication *)application {

}


It is possible, but only if you actually implement it as a UIView that is called to render from your app delegate when your app re-enters the foreground.

But I would strongly advise against this practice, because you will greatly annoy your users because every time they switch back into your app they will be greeted by a splash screen that requires them to wait a second before they can carry on with their task.

The launch image is used only on a cold start of an application to reassure the user that the application is loading; it is not to be used as a gimmick.


use delegate method applicationWillResignActive and exit(0) your app like below code

func applicationWillResignActive(_ application: UIApplication) { exit(0) }

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜