ios - 调整 Xcode iPhone 模拟器的比例和大小

标签 ios xcode ios-simulator scale simulator

<分区>

有没有办法在 Xcode 中为 iPhone 5 制作 iOS 模拟器,是 iPhone 5 的实际尺寸。我得到了一个巨大的显示器,而且东西似乎被缩放了。

最佳答案

使用 Xcode 9 - Simulator,您可以选择并拖动模拟器的任何角落以调整其大小并根据您的要求进行设置。

看看这个快照。

enter image description here


注意:在 Xcode 9.1+ 中,模拟器缩放选项已更改。


键盘快捷键:
根据Xcode 9.1+

Physical Size       ⌘ 1      command + 1
Pixel Accurate      ⌘ 2      command + 2


根据 Xcode 9

50% Scale           ⌘ 1      command + 1
100% Scale          ⌘ 2      command + 2
200% Scale          ⌘ 3      command + 3

Xcode 菜单中的模拟器缩放选项:

Xcode 9.1+:
Menubar ▶ Window ▶ "Here, options available change simulator scale" (Physical Size & Pixel Accurate)

Pixel Accurate:将您的模拟器调整为实际(物理)设备的像素,如果您的 mac 系统显示屏幕尺寸(像素)支持那么高的分辨率,否则此选项将保持禁用状态。

提示:如果禁用了精确像素,则旋转模拟器( ⌘ + ← ⌘ + → )。它可以横向启用(如果它适合屏幕)。

enter image description here


Xcode 9.0
Menubar ▶ Window ▶ Scale ▶ "Here, options available change simulator scale"

enter image description here


提示:如何获得可以上传到 AppStore 的 100%(具有实际设备尺寸的比例)的屏幕截图?

在截屏之前,从Debug 菜单中禁用'Optimize Rendering for Window scale'(参见此处:How to take screenshots in the iOS simulator)

有一个选项

Menubar ▶ Debug ▶ Disable "Optimize Rendering for Window scale"

enter image description here


这是 Apple 的文档:Resize a simulator window

关于ios - 调整 Xcode iPhone 模拟器的比例和大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18606926/

相关文章:

objective-c - 通过键盘快捷键的 xcode 3.2.1 文件历史记录

ios - 如何在tableview cell swift 3.0中设置选中的复选标记

ios - 解析 : how to design the data structure so that showing 500K followers will be fast

ios - 来自 UICollectionView Cell 的 Swift 3 Segue

xcode - 我可以仅使用开发人员和 iTunes 帐户导出 iOS 应用程序吗?

ios - 如何在PC Windows上下载并运行iOS模拟器

ios - 动画预定定时器错误

ios - UIView 是 UIScrollView 的 subview 。如何跟踪 subview 在定义的矩形内?

iOS模拟器声音

ios - iPad Pro Sim 会发生 NSInvalidArgumentException 崩溃,但其他 iPad Sim 不会崩溃