ios 在 Xcode 9 中的 iPhone 模拟器中截取屏幕截图
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/46723932/
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
Take screenshot in iPhone Simulator in Xcode 9
提问by Rohitax Rajguru
How can I take screenshot of size 1242 x 2208 (required for App Store) from iPhone 8 Plus simulator in Xcode 9.0? I can't resize the simulator like we did in earlier versions of Xcode. Is there any way to do it?
如何从 Xcode 9.0 中的 iPhone 8 Plus 模拟器截取大小为 1242 x 2208(App Store 需要)的屏幕截图?我无法像在早期版本的 Xcode 中那样调整模拟器的大小。有什么办法吗?
回答by arunjos007
回答by Krunal
Use ? + Sto capture a screen shot.
(Use window + s, if you are using windows/non-apple keyboard).
使用? + S捕捉屏幕截图。
(window + s如果您使用的是 Windows/非苹果键盘,请使用 )。
See for more details: How to change simulator scale options with Xcode 9+.
有关更多详细信息,请参阅:如何使用 Xcode 9+ 更改模拟器比例选项。
Tip 1: How do you get screen shot with 100% (a scale with actual device size) that can be uploaded on AppStore?
提示 1:如何获得可以在 AppStore 上传的 100%(与实际设备大小的比例)的屏幕截图?
DisableOptimize Rendering for Window scale
from Debug
menu, before you take a screen shot.
在您拍摄屏幕截图之前,Optimize Rendering for Window scale
从Debug
菜单中禁用。
Here is an option
这是一个选项
Menubar ? Debug ? Disable "Optimize Rendering for Window scale"
菜单栏 ?调试?禁用“优化窗口比例渲染”
Tip 2: How to take a screen shot with Device Bezel?
技巧 2:如何使用 Device Bezel 截屏?
Enable Show Device Bezel
from Window
menu.
Show Device Bezel
从Window
菜单启用。
Here is an option
这是一个选项
Menubar ? Window ? Enable "Show Device Bezel"
菜单栏 ?窗户 ?启用“显示设备边框”
Now,
现在,
- Press ?+ shift+ 4+ Spacebar, all together in Mac Keyboard. (A window snap capture mode will become active)
- Select
Simulator
window/frame, that you want to capture. It will save screenshot with device bezel (with shadow effect in background) on (logged-in user's) desktop.
- 在 Mac 键盘中同时按下?+ shift+ 4+ Spacebar。(窗口捕捉模式将变为活动状态)
- 选择
Simulator
要捕获的窗口/框架。它将在(登录用户的)桌面上保存带有设备边框(背景中有阴影效果)的屏幕截图。
回答by trungduc
I tried and can take screenshot of size 1242 x 2208(required for App Store) from iPhone 8 Plus simulator in XCode 9.0 by steps below.
我尝试并可以通过以下步骤从 XCode 9.0 中的 iPhone 8 Plus 模拟器截取大小为 1242 x 2208(App Store 需要)的屏幕截图。
- Open your simulator
- Double click on toolbar of your simulator
- Command + S
- 打开你的模拟器
- 双击模拟器的工具栏
- 命令 + S
The saved screenshot will have right dimensions. It works with every simuator.
保存的屏幕截图将具有正确的尺寸。它适用于每个模拟器。
回答by HafizAnser
Please use different iPhone Plus screen and make sure that is "Pixel Accurate" (click on Windowand set Pixel Accurate).
请使用不同的 iPhone Plus 屏幕并确保它是“Pixel Accurate”(点击Window并设置Pixel Accurate)。