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.
有什么方法可以检测,是 iPhone 5、iPhone 6 还是 iPhone 6+?
早些时候我是根据分辨率做的:
if ([[UIScreen mainScreen] bounds].size == 568) NSLog(@"4 inch"); else NSLog(@"3.5 inch");
但现在所有分辨率(4、4.7、5.5)都给了我相同的 568 高度。那我该怎么办?