我已经在iphone模拟器上开发了一款应用数周了,到目前为止它一直运行得很好,但在加载内容和动画时突然开始运行很慢。自从上次测试成功以来,我没有对我的代码做任何更改。

我尝试重新启动模拟器(多次)和删除应用程序,并做一个完全干净的重建,但没有运气。在模拟器运行时,我还通过监视器检查了我的cpu使用情况,我只使用了大约30%的cpu和40%的内存。

我完全理解模拟器从来没有设备本身那么快,但它在这么长时间后突然开始变慢,这似乎很奇怪,我所说的慢是指不到原始速度的四分之一。


当前回答

I don't have the rep yet to leave a comment, but I upvoted some answers here and wanted to say more. I had a problem with slow animations in the iOS Simulator, especially on rotation, and I found this post via Google. Indeed, somehow "Toggle Slow Animations" must have been on, because three shifts fixed it. At first, I didn't think this was a problem because there's no checkmark next to "Toggle Slow Animations." It turns out there's never a checkmark, or any indication from the menu whether it's on or off. So just try toggling it and see if the rotation/navigation is faster/slower.

所以,谢谢大家!

其他回答

使用模拟器时,在调试时不小心按下了慢动画。 运行模拟器->调试->取消选中慢速动画。

选择模拟器,

选择调试,取消选中慢动画。 快捷方式 Command + t

那是我的工作。

当chrome调试是活动的,浏览器选项卡不在前台,模拟器也很慢。对我来说,我决定把指南放在前台。

转到模拟器的Debug菜单并选择“Toggle Slow Animations”。

更新:在Xcode 10中,它只是“慢动画”:

您可以尝试关闭远程调试(Cmd-D ->停止远程JS调试)。这通常会加快速度。