[英]Take screenshot in iPhone Simulator in Xcode 9
How can I take screenshot of size 1242 x 2208 (required for App Store) from iPhone 8 Plus simulator in Xcode 9.0? 如何从Xcode 9.0中的iPhone 8 Plus模拟器获取尺寸为1242 x 2208(App Store需要)的屏幕截图? I can't resize the simulator like we did in earlier versions of Xcode. 我不能像在早期版本的Xcode中那样调整模拟器的大小。 Is there any way to do it? 有什么办法吗?
I have met the similar problem and here is the solution. 我遇到了类似的问题,这是解决方案。 Uncheck " Optimize Rendering for Window Scale " option from " Debug " menu. 从“ Debug ”菜单中取消选中 “ Optimize Rendering for Window Scale ”选项。 Then take your screenshot( Cmnd + S ) with zoom. 然后用缩放拍摄截图( Cmnd + S )。 Now it will be in size 1242 x 2208 现在尺寸为1242 x 2208
Use ⌘ + S to capture a screen shot. 使用⌘+ S捕获屏幕截图。
(Use window + s , if you are using windows/non-apple keyboard). (如果您使用的是Windows /非Apple键盘,请使用窗口+ s )。
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%(具有实际设备大小的比例)进行屏幕截图?
Disable Optimize Rendering for Window scale
from Debug
menu, before you take a screen shot. 在拍摄屏幕截图之前, 禁用“ Debug
菜单中的“ Optimize Rendering for Window scale
。
Here is an option 这是一个选项
Menubar ▶ Debug ▶ Disable "Optimize Rendering for Window scale" 菜单栏▶调试▶禁用“优化窗口刻度渲染”
Tip 2: How to take a screen shot with Device Bezel? 提示2:如何使用设备挡板拍摄屏幕截图?
Enable Show Device Bezel
from Window
menu. 从“ Window
菜单启用“ Show Device Bezel
。
Here is an option 这是一个选项
Menubar ▶ Window ▶ Enable "Show Device Bezel" 菜单栏▶窗口▶启用“显示设备挡板”
Now, 现在,
Simulator
window/frame, that you want to capture. 选择要捕获的Simulator
窗口/框架。 It will save screenshot with device bezel (with shadow effect in background) on (logged-in user's) desktop. 它将在(登录用户)桌面上保存带有设备挡板(背景阴影效果)的屏幕截图。 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所需)的屏幕截图。
The saved screenshot will have right dimensions. 保存的屏幕截图将具有正确的尺寸。 It works with every simuator. 它适用于每个模拟器。
请使用不同的iPhone Plus屏幕并确保“Pixel Accurate”(单击Window并设置Pixel Accurate )。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.