简体   繁体   English

启动屏幕需要很长时间才能消失

[英]Launch Screen takes too long to disappear

I just started learning Swift. 我刚开始学习Swift。 It's been only a month, and I can assure you that I'm not doing anything fancy. 这只是一个月,我可以向你保证,我没有做任何花哨的事情。 Yet, the launch screen on the simulator is taking a long time to disappear before the app starts. 然而,在应用程序启动之前,模拟器上的启动屏幕需要很长时间才能消失。 It stays on for at least 5 seconds, and it takes another 2.5 seconds to slowly fade away. 它会持续至少5秒钟,然后再慢慢消退需要2.5秒。 And as it fades out, the first view of the app slowly fades in. It was working fine (took only a fraction of a second) until a couple of days ago when this started happening suddenly while I was working on a sample app. 随着它逐渐淡出,应用程序的第一个视图慢慢消失。它工作正常(只花了一秒钟),直到几天前,当我开始使用示例应用程序时突然发生这种情况。 Here are things I've confirmed: 以下是我确认过的事情:

  • During the initial 5 seconds, the app won't accept any user interaction. 在最初的5秒内,应用程序将不接受任何用户交互。 But during the 2.5 seconds of fading, it responds to touches. 但在2.5秒的褪色过程中,它会对触摸产生反应。
  • This is a systematic problem because ALL sample code shows the same problem. 这是一个系统性问题,因为所有示例代码都显示相同的问题。
  • Even a new project, without any modifications, shows the same problem. 即使是没有任何修改的新项目也会出现同样的问题。 I tried both "Game" and "Single View Application". 我尝试了“游戏”和“单一视图应用程序”。 After the name of the project is displayed as a launch screen, it takes about 8 seconds for the "Hello World" to appear completely. 在项目名称显示为启动屏幕后,“Hello World”完全显示大约需要8秒钟。 (When "Game" is selected.) (选择“游戏”时。)
  • Restarting Xcode and rebooting the Mac do not help. 重新启动Xcode并重新启动Mac无济于事。
  • Updating to Xcode (6.4) does not help. 更新到Xcode(6.4)没有帮助。 My Xcode was 6.3.x (I believe it was 6.3.2 before the update). 我的Xcode是6.3.x(我相信在更新之前它是6.3.2)。
  • Reinstalling a new copy does not help. 重新安装新副本没有帮助。 I deleted the newly updated 6.4, and re-installed a new copy of 6.4. 我删除了新更新的6.4,并重新安装了6.4的新副本。
  • The only similar incident I could find was this link , which did not provide the answer. 我能找到的唯一类似事件就是这个链接 ,它没有提供答案。

I was working on a simple practice program. 我正在研究一个简单的练习计划。 It ran successfully just like it did numerous times before. 它成功运行就像以前一样。 Then, I made some minor changes to the code (nothing fancy --- just some trivial changes.) And the next time I pressed the RUN button, I noticed that the launch screen took a considerably longer to disappear. 然后,我对代码做了一些小改动(没什么好看的 - 只是一些微不足道的改变。)下次我按下RUN按钮时,我注意到启动屏幕需要相当长的时间才能消失。 After that, it just won't go back to the way it was. 在那之后,它不会再回到现在的样子。

Could someone please advise the cause of the problem and the solution? 有人可以告诉问题的原因和解决方案吗? Thank you very much. 非常感谢你。

You may have Slow Animations turned on. 您可以启用慢动画。 Go to the simulation and check under Debug: 转到模拟并在Debug下检查:

在此输入图像描述

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

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