Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我创建一个新的通用应用程序时,我看到初始控制器 xib 文件具有“_iPad”和“_iPhone”的后缀。
这很好,我知道应用程序委托通过 userInterfaceIdiom 选择了正确的文件
但是,我读到我可以使用“〜iPad”和“〜iPhone”的后缀自动达到相同的效果
我对此非常好奇。如果可以通过添加波浪号 (~) 符号来完成此选择,为什么默认的通用应用程序文件结构不使用它?
是的你是对的。我正在使用 ~ipad 和 ~iphone 从应用程序包中加载图像,它就像一个魅力。它为我节省了很多工作,因为这种方法非常简单。正如蒂尔所说,人们是不同的,有些人喜欢控制一切,有些人则不:)