如何在 Xcode 中加速 iPhone 模拟器

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/35398356/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 08:32:16  来源:igfitidea点击:

How to speed up the iPhone simulator in Xcode

iosiphonexcodeperformanceios-simulator

提问by HELLO

I'm using Xcode 7.2. When I build/run my app on device, all objects and images move according to the speed I set in the code, everything moves quickly. However, on iPhone simulator in Xcode, everything moves slowly. I don't have iPhone 6Plus device so with the slow moving app in simulator it'll be difficult for me to determine whether the objects are moving fast enough in the code.

我正在使用 Xcode 7.2。当我在设备上构建/运行我的应用程序时,所有对象和图像都根据我在代码中设置的速度移动,一切都快速移动。但是,在 Xcode 中的 iPhone 模拟器上,一切都进展缓慢。我没有 iPhone 6Plus 设备,因此在模拟器中使用缓慢移动的应用程序时,我很难确定代码中的对象移动速度是否足够快。

Is there a way on Xcode to make the simulator move the objects and images at the same speed as the device instead of a slowed down version?

Xcode 上有没有办法让模拟器以与设备相同的速度移动对象和图像,而不是减慢版本?

回答by Tim Kokesh

In the Debug menu in the Simulator, there is a "Slow Animations" menu item. It sounds like you have it set.

在模拟器的调试菜单中,有一个“慢动画”菜单项。听起来你已经设置好了。

回答by BHUVANESH MOHANKUMAR

Once you execute your app in simulator you can go to Debug Menu and select the "slow Animations" option Check for slowness and UnCheck for Fast response on the screen changes.

在模拟器中执行您的应用程序后,您可以转到调试菜单并选择“慢动画”选项检查缓慢并取消检查屏幕变化的快速响应。

Debug -> Slow Animation

调试 -> 慢速动画

Command + T is the short cut for same.

Command + T 是同样的捷径。

enter image description here

在此处输入图片说明

回答by Da1nonlyjman

As mentioned in previous answers, in the Simulator "Debug" menu, make sure "Slow Animations" is turned off and any unnecessary applications are closed. However, if you are still having slow performance from the Simulator, you can also select "Low Image Quality" in the "Debug" menu. It's not ideal, however if your computer is still struggling to run the Simulator, it's a quick way to ensure your animations are running how they're supposed to.

正如前面的答案中提到的,在模拟器的“调试”菜单中,确保关闭“慢速动画”并关闭所有不必要的应用程序。但是,如果模拟器的性能仍然很慢,您也可以在“调试”菜单中选择“低图像质量”。这并不理想,但是如果您的计算机仍在努力运行模拟器,这是确保您的动画按预期运行的快速方法。

回答by Snow64

Check out this link

看看这个链接

A couple things you could do include:

您可以做的几件事包括:

  • Close unused applications to free system resources such as cpu & memory
  • make sure "slow animations" is not selected in the simulator debug menu. Short cut for this is ?T simulator -> Debug -> slow animations
  • 关闭未使用的应用程序以释放 CPU 和内存等系统资源
  • 确保在模拟器调试菜单中没有选择“慢动画”。捷径是 ?T 模拟器 -> 调试 -> 慢动画

The IOS simulator is used for rapid prototyping and is not guaranteed to perform like a real device. It operates similar to any OSX application and is limited to the available resources(e.g memory, storage , cpu, etc) provided by OSX.

IOS 模拟器用于快速原型设计,不能保证像真实设备一样运行。它的操作类似于任何 OSX 应用程序,并且仅限于 OSX 提供的可用资源(例如内存、存储、cpu 等)。

回答by Joshua Stern

In the simulator type command+ T) to turn off simulator slow animation.

在模拟器中输入command+ T) 关闭模拟器慢速动画。

回答by Bachir Ndiaye

I noticed that the selection of the iPhone 6 instead of the iPhone X for example (less recent iPhone) makes things much faster.

我注意到例如选择 iPhone 6 而不是 iPhone X(较新的 iPhone)使事情变得更快。