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.
如何更改主窗口笔尖名称?我正在为 iPhone4 和 iPhone5 使用两个 xib。但我的项目有主窗口。如何检查和更改 iPhone5 和 iPhone4 的 xib。
请帮我。提前致谢。
使用以下宏:
#define IS_IPHONE_5 ( fabs( ( double )[ [ UIScreen mainScreen ] bounds ].size.height - ( double )568 ) < DBL_EPSILON )
然后在您的代码中:
if (IS_IPHONE_5) { ... load the nib for iPhone5 ... } else { ... load the nib for iPhone4 ... }