没有 iPhone,如何用 XCode 截屏?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10520373/
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 00:15:02  来源:igfitidea点击:

Without iPhone, how to take screenshot with XCode?

xcodescreenshot

提问by TomSawyer

I'm building iPhone / iPad app with Xcode. now i want to take screenshot of this application.

我正在使用 Xcode 构建 iPhone/iPad 应用程序。现在我想截取这个应用程序的屏幕截图。

with 960x640 size.

大小为 960x640。

so how to? the screen on simulator is too small

那怎么办?模拟器上的屏幕太小

回答by olirip

You can use cmd+Sinto the simulator, it will capture the screen.

您可以使用cmd+S进入模拟器,它会捕获屏幕。

Image will be saved to the Desktop.

图像将保存到桌面。

回答by Mick MacCallum

In the simulator navigate to

在模拟器中导航到

Hardware>>Device>>iPhone (Retina)

硬件>>设备>>iPhone(视网膜)

Then you can use command-s to capture the simulators screen in retina, and the screenshot requirement is 640x960.

然后就可以用command-s在Retina中截取模拟器画面,截屏要求为640x960。

Keep in mind, the retina simulator screen may not fit vertically on your screen depending on its resolution.

请记住,视网膜模拟器屏幕可能无法垂直放置在您的屏幕上,具体取决于其分辨率。

回答by user1320885

you can also use cmd+shift+4 to take screenshot with the iphone frame in it.

您还可以使用 cmd+shift+4 使用其中的 iphone 框架截取屏幕截图。