如何在iOS模拟器中测试动态类型(较大的字体大小) [英] How to test Dynamic Type (larger font sizes) in iOS Simulator

查看:792
本文介绍了如何在iOS模拟器中测试动态类型(较大的字体大小)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在iOS中更改动态类型设置可以手动完成(设置>常规>辅助功能>较大文本)。



但这似乎不适用于当前的模拟器(在撰写本文时为v9.3)并且手动执行此操作并不是需要自动化的解决方案。



问题:是否存在一种启动具有动态类型设置的应用程序以启动具有更大字体大小的应用程序的方法?



注意:这不仅对UI测试很有用,而且也用于此目的使用具有更大字体大小的Fastlane Snapshot创建屏幕截图。

解决方案

从Xcode 8开始,有一个比未记录的发布更好的选择参数:辅助功能检查器。它包含在


Changing Dynamic Type settings in iOS can be done manually (Settings > General > Accessibility > Larger Text).

But this does not appear to work in the current Simulator (v9.3 at the time of writing), and doing so manually is not a solution where automation is required.

Question: Is there a way to launch an app with Dynamic Type settings to launch an app with larger font sizes?

Note: This is not only useful for UI testing, but also for the purpose of creating screenshots using Fastlane Snapshot with larger font sizes.

解决方案

As of Xcode 8, there is a better option than the undocumented launch arguments: Accessibility Inspector. It is covered in this talk and can be found under Xcode > Open Developer Tool.

这篇关于如何在iOS模拟器中测试动态类型(较大的字体大小)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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