In iOS versions prior to iOS 8, to check whether the device is iPhone 5/iPhone 5s, checking [UIScreen mainScreen].bounds.size.height == 568.0 was enough. But in iOS 8.x onwards, this check may fail as the bounds are now orientation dependant. I need a solution to identify the iPhone 5s, 6 and 6+ devices without checking the iOS version.
iOS 8.x alternative to detect iPhone 5s, using [UIScreen mainScreen].bounds.size.height == 568.0
866 views Asked by AudioBubble At
2
I was able to detect the devices using the following macros. This will be useful if you want identify the device, to perform some update on views(like updating frames on orientation changes). If you exactly want the device model/make, use this link (ios iphone get device model and make?) instead.