我正在编写一个通用的iOS应用程序(适用于iPad和iPhone),发现自己需要使用非常长的类名,这些类名不能在两个应用程序之间共享:
FamilyViewController_iPhone.h/m
FamilyViewControllerA_iPad.h/m
DetailViewControllerB_iPhone.h/m
DetailViewControllerB_iPad.h/m
同样,这些类内部的名称包括设备名称,主要是为了方便Interface Builder使用。
我考虑过像AControllerA.h和BControllerA.h这样的命名方式,其中A表示iPhone,B表示iPad,但对此选项并不感到兴奋。
在iOS通用应用程序中,这种类的惯例是什么 - 或者我(希望如此)是否遗漏了可以避免这种必要性的东西?