xcode 缩小时如何在Xcode 7中使用iOS Simulator获取屏幕截图的原始大小
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/33765160/
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
How to get the original size of screenshots using iOS Simulator in Xcode 7 when scaling down
提问by sbs
In Xcode 7.1 Simulator, when using ?+s
to save screenshot to desktop, it saves the actual size of the simulator. For example, iPhone 6 Plus 100%
scale simulator save screenshots as 1242 x 2208
; 25%
scale simulator save screenshots as 310 x 552
.
在 Xcode 7.1 Simulator 中,当?+s
用于将屏幕截图保存到桌面时,它会保存模拟器的实际大小。例如,iPhone 6 Plus100%
比例模拟器将截图保存为1242 x 2208
;25%
缩放模拟器将屏幕截图另存为310 x 552
.
Is there a way to make the simulator scale to 25%
but still get original size of 1242 x 2208
? The 100%
simulator is just too huge on a 13" screen.
有没有办法让模拟器按比例缩放25%
但仍然获得原始大小1242 x 2208
?该100%
模拟器只是一个13"屏幕上过于庞大。
It used to save as original size regardless scale level, but in Xcode 7.1 it's no longer the case.
无论比例级别如何,它都曾经保存为原始大小,但在 Xcode 7.1 中不再如此。
回答by SamSol
回答by Mepix
@SamSol's answer may work for earlier versions of Xcode, but the debug window does not appear to be present in Xcode 11+.
@SamSol 的答案可能适用于早期版本的 Xcode,但调试窗口似乎不存在于 Xcode 11+ 中。
Instead, I followed this suggestionfrom the Apple Developer forum:
相反,我遵循了 Apple Developer 论坛的这个建议:
- In the Simulator, go to Edit -> Copy Screen (^?C)
- Open Preview and paste as a new image (?N)
- Save the resulting image (?S)
- 在模拟器中,转到 Edit -> Copy Screen (^?C)
- 打开预览并粘贴为新图像 (?N)
- 保存生成的图像 (?S)
The saved output image should have the desired resolution to be included on the Apple App Store.
保存的输出图像应具有包含在 Apple App Store 中的所需分辨率。
回答by uae2ae
To take a screenshot of the iOS, watchOS, or tvOS device and save it to your Mac Clipboard
截取 iOS、watchOS 或 tvOS 设备的屏幕截图并将其保存到 Mac 剪贴板
choose Edit > Copy Screen.
选择“编辑”>“复制屏幕”。
- To save a screenshot of the iOS, watchOS, or tvOS device and of the external display as files
- 将 iOS、watchOS 或 tvOS 设备以及外部显示器的屏幕截图保存为文件
choose File > Save Screen Shot.
选择“文件”>“保存屏幕截图”。
A screenshot of each open simulated device is saved to the desktop of your Mac.
每个打开的模拟设备的屏幕截图都会保存到 Mac 的桌面。