更改加载图像?
我希望每次启动应用程序时加载图像都不同。应用程序启动后,有没有办法将其更改为其他内容?
I want to have my loading image be different each time i start the app. Is there a way to change this to something else once the app's started?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从技术上讲,不。启动图像位于应用程序包内 - 作为 iOS 沙箱的一部分,应用程序无法更改或修改该包内的文件(因此您的 Info.plist 和背景图像)。
可以将启动图像设置为黑色,然后在调用
applicationDidFinishLoading
方法后将其替换为另一个启动画面,并保持几秒钟 - 但请记住,这会降低启动画面的性能。用户体验,因为您将延迟进入应用程序所需的时间。Not technically, no. The startup images are located inside the application bundle - as part of iOS's sandboxing, applications can't change or modify files inside that bundle (so your Info.plist and your background images).
It would be possible to have your startup image be black, and then swap it out for another splash screen that you hold for a few seconds as soon as your
applicationDidFinishLoading
method is called - but remember this will degrade the user experience, since you'll be delaying the time it takes to get into the app.