在iOS模拟器中截取屏幕截图

曹兴贤
2023-12-01

本文翻译自:Take screenshots in the iOS simulator

I want to take a screenshot of my iOS application when it is running in the simulator, and save the screenshot on my Mac. 我想在模拟器中运行我的iOS应用程序的屏幕截图,并将屏幕截图保存在我的Mac上。 How can I do this? 我怎样才能做到这一点?


#1楼

参考:https://stackoom.com/question/Tl6z/在iOS模拟器中截取屏幕截图


#2楼

It's just as simple as command + s or File > Save Screen Shot in iOS Simulator. 它只是为命令 + S或简单File > Save Screen Shot在iPhone模拟器。 It will appear on your desktop by default. 它默认显示在您的桌面上。


#3楼

  1. Focus simulator 聚焦模拟器
  2. Go to menu File->Save Screen Shot 转到菜单文件 - >保存屏幕截图

    or 要么

    Press + S + S.

Screen shot saves in desktop 屏幕截图保存在桌面上


#4楼

Since Xcode 8.2, you can also save a screenshot with the following command: 从Xcode 8.2开始,您还可以使用以下命令保存屏幕截图:

xcrun simctl io booted screenshot

Further information in this blog: https://medium.com/@hollanderbart/new-features-in-xcode-8-2-simulator-fc64a4014a5f#.bzuaf5gp0 此博客中的更多信息: https//medium.com/@hollanderbart/new-features-in-xcode-8-2-simulator-fc64a4014a5f#.bzuaf5gp0


#5楼

In OSX Captain its a bug to take screenshot of simulator. 在OSX Captain它的一个bug来截取模拟器的截图。 You have to Update your OSX Sierra first then your are able to take. 您必须首先更新您的OSX Sierra,然后才能使用。 while taking in OSX Captain use terminal command which is xcrun simctl io booted screenshot . 在接受OSX Captain使用终端命令时,这是xcrun simctl io启动截图

before running this command u have to select desktop in terminal like: 在运行此命令之前,您必须在终端中选择桌面,如:

"cd desktop" then run that command. “cd desktop”然后运行该命令。 Happy Coding!!! 快乐的编码!!!


#6楼

Taking Screen Shot in IOS Simulator is SO Simple. 在IOS模拟器中进行屏幕截图非常简单。

When you Open Simulator In the Right Lift You See File. 当您在右侧提升打开模拟器时,您看到文件。

Click On File And You See Option Save Screen Shot. 单击文件并看到选项保存屏幕截图。

This Option Saves Your Screen Shot In Default Path Which is Desktop. 此选项可以在默认路径中保存屏幕截图,这是桌面。

 类似资料: