有没有更快的方法来更改iOS模拟器上的辅助功能(动态类型)文本大小? [英] Is there a faster way to change accessibility (dynamic type) text size on iOS simulator?

查看:156
本文介绍了有没有更快的方法来更改iOS模拟器上的辅助功能(动态类型)文本大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的iPhone XS上,我在控制中心中创建了一个快捷方式,可以快速更改文本大小并进行测试,以确保所有大小都可以在我的iPhone上使用.

On my iPhone XS, I created a shortcut in the Control Center to quickly change the text size and test to make sure all the sizes work on my iPhone.

但是,我经常在模拟器中进行测试,需要切换到设置"应用并通过多个菜单来切换文本大小,这很繁琐.

However, I'm often in the simulator trying to test, and it's tedious to need to switch to the Settings app and go through multiple menus to switch the text size.

由于模拟器没有控制中心,是否还有另一个更轻松地更改文字大小的方法?

Since the simulator has no Control Center, is there another way to more easily change the text size?

推荐答案

达到目标的最佳方法取决于您使用的Xcode版本.

The best way to reach your goal depends on the Xcode version you're using.

Xcode 10 中,转到Xcode-Open Developer Tool菜单并选择Accessibility Inspector元素:

In Xcode 10, go to the Xcode - Open Developer Tool menu and select the Accessibility Inspector element:

  1. 如果尚未运行模拟器,请立即执行并在面板中选择它.
  2. 选择Settings按钮以显示不同的文本大小.
  3. 通过更改字体大小来测试动态类型实现.
  1. If you haven't run your simulator, do it now and select it in the panel.
  2. Select the Settings button to display the different text sizes.
  3. Test your dynamic type implementation by changing the font size.

如果您需要有关此工具的进一步说明,强烈建议您看一下这些WWDC的详细摘要,其中包含非常有用的信息:

If you need further explanation about this tool, I strongly recommend to take a look at these WWDC detailed summaries that contain very useful information: 2016 and 2019.

Xcode 11 中,有一个新选项:如果尚未运行模拟器,请立即进行操作,然后在Xcode中选择LOG窗口:

In Xcode 11, there's a new option directly accessible from the debug bar in the LOG window: if you haven't run your simulator, do it now and select the LOG window in Xcode:

  1. 选择Environment Overrides按钮以打开新窗格.
  2. 打开TEXT,更改文本大小并在模拟器上动态显示其呈现.
  1. Select the Environment Overrides button to open the new pane.
  2. Switch the TEXT on, vary the text size and dynamically visualize its rendering on the simulator.

在我看来,使用这些工具是测试动态类型"功能实现的最快方法.

Using these tools is, in my view, the fastest way to test the Dynamic Type feature implementation.

这篇关于有没有更快的方法来更改iOS模拟器上的辅助功能(动态类型)文本大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆