在macOS 12.4上,当从Mac催化剂调用UIDevice.current.userInterfaceIdiom时,当启用Scale Interface to Match iPad设置时,返回.iPadOS:

但是,如果将此设置更改为“优化macOS”,则UIDevice.current.userInterfaceIdiom在macOS上正确工作。

这是预期的行为吗?
发布于 2022-06-18 00:25:19
On macOS,UITraitCollection和UIDevice类报告了以下iOS成语类型,而不是UIUserInterfaceIdiom.mac
https://stackoverflow.com/questions/72575352
复制相似问题