MonoTouch:正在加载屏幕 [英] MonoTouch: Loading screen

查看:63
本文介绍了MonoTouch:正在加载屏幕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序有一个加载屏幕(default.png).

I have a loading screen for my app (default.png).

当用户暂停我的应用程序时,我以为iOS会在恢复我的应用程序时自动获取屏幕截图并将其用作加载屏幕?

When user suspends my app, I thought that iOS would automatically take a screenshot and use it as a loading screen when my app is resumed?

如果我实现了这个... http://pastebin.com/P0w9GJrB ...我不会覆盖我的载入画面吗?我的意思是,如果我的视图中有很多东西,则用户按下homebutton,我的应用程序将转到后台.我保存了屏幕截图.现在,用户终止了我的应用程序.下次他运行我的应用程序时,会不会加载已保存的屏幕截图,而不是加载原始图像?我问的原因是,如果用户强制终止我的应用程序,那么他在启动我的应用程序时应该会看到一个干净的加载屏幕,而不是混乱的保存的屏幕截图?

If I implement this... http://pastebin.com/P0w9GJrB ... won't I overwrite my loadingscreen? I mean if I have a lotta stuff on my view, the user presses homebutton and my app goes to the background. I save the screenshot. Now the user terminates my app. Next time he run my app, won't he load the saved screenshot instead of my original loading image? Reason I'm asking is, that if user forces my app to terminate, then he should see a clean loading screen when starting up my app instead of a messy saved screenshot?

谢谢.

Mojo

推荐答案

您不应覆盖您的应用程序文件,包括 Default.png ,因为它是应用程序捆绑包的一部分.这样做会使捆绑软件的数字签名失效,而iOS不会启动捆绑软件(除非您拥有扎根的设备).

You should not be able to write over your applications files, including Default.png, since it's part of the application bundle. Doing so would invalidate the digital signature of the bundle and iOS would not launch it (unless you have a rooted device).

您可能不使用 Default.png 而改用您自己的文件,例如存放在您具有写访问权的Document目录中,但是它将比iOS启动应用程序时可以执行的显示晚(并且通过您自己的代码显示,就像您在pastebin中一样).

You can likely hack around this by not using Default.png but your own file, e.g. stored inside the Document directory where you have write access, but it will be shown later (and by your own code, like you already have in your pastebin) than what can be done by iOS when it launch your application.

即使是值得的...这完全取决于您的应用程序加载所需的时间.

Even so it can be worth it... it all depends on how much time your application takes to load.

这篇关于MonoTouch:正在加载屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆