In ios7, with Xcode5 i use a macro to detect if the device is iphone 5 or 4 ,4s. And i never had any problems it always work right.
#define IS_WIDESCREEN ( fabs( ( double )[ [ UIScreen mainScreen ] bounds ].size.height - ( double )568 ) < DBL_EPSILON )
if (IS_WIDESCREEN){
//5s
}else{
//4,4s
}
But in xcode6 it doesn’t work the IS_WIDESCREEN state is always false .
The problem is that in Xcode6 with iOS 8
[[ UIScreen mainScreen ] bounds ].size.height
is equal to 320 instead of 568.
Do i need to find a new macro ? I found on internet (iOS Writing Macro detect 3.5 inch or 4 inch display) the same is used to detect the iphone 5 screen size