iPhone模拟器突然开始运行非常慢

本文翻译自:iPhone Simulator suddenly started running very slow

I have been working on an app in iphone simulator for a number of weeks and it has been running well up until now, but all of a sudden has begun running very slow both when loading content and animations. 我已经在iphone模拟器上开发了一个应用程序已经有好几个星期了,直到现在它一直运行良好,但在加载内容和动画时,突然间开始运行非常缓慢。 I have not made any changes to my code since I last tested it successfully. 自从我上次成功测试以来,我没有对我的代码进行任何更改。

I tried restarting the simulator (multiple times) and removing the app and doing a completely clean rebuild, but no luck. 我尝试重启模拟器(多次)并删除应用程序并进行完全干净的重建,但没有运气。 I also checked my cpu usage through the monitor while the simulator is running and I am only using about 30% of my cpu and 40% of memory. 我还在模拟器运行时通过显示器检查了我的cpu使用情况,我只使用了大约30%的CPU和40%的内存。

I fully understand that the simulator is never a quick as the device itself, but it seems strange that it has suddenly started running slow after such a long time, and by slow I mean less than a quarter of its original speed. 我完全理解模拟器从来不像设备本身那么快,但似乎奇怪的是它在这么长时间后突然开始慢速运行,而且我的意思是它不到原始速度的四分之一。


#1楼

参考:https://stackoom.com/question/12Otf/iPhone模拟器突然开始运行非常慢


#2楼

Go to the simulator's Debug menu and select "Toggle Slow Animations". 转到模拟器的Debug菜单,然后选择“Toggle Slow Animations”。

Update: In Xcode 10, it's just "Slow Animations": 更新:在Xcode 10中,它只是“慢动画”:

模拟器调试菜单


#3楼

In the iOS simulator, at the bar on the top, click on DebugToggle Slow Animations (or Slow Animations with Xcode 10+). 在iOS模拟器中,在顶部的栏上,单击DebugToggle Slow Animations (或使用Xcode 10+的Slow Animations )。 Chances are you accidentally toggled it on. 你有可能偶然切换它。


#4楼

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. 我在iOS模拟器中遇到动画速度慢的问题,特别是在旋转时,我发现这篇文章来自谷歌。 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." 起初,我认为这不是一个问题,因为“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. 因此,只需尝试切换它,看看旋转/导航是否更快/更慢。

So, thank you! 所以谢谢!


#5楼

我认为你错误地按了命令+ T而不是命令+ R.


#6楼

You accidentally pressed the slow animation on debug when using simulator. 使用模拟器时,您不小心在调试时按了慢动画。 So Run Simulator -> Debug -> Uncheck Slow Animation. 所以运行模拟器 - >调试 - >取消选中慢动画。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值