It wouldn't because the screen's coordinate system is in points, not pixels. Try it like this:
CGRect screenBound = [[UIScreen mainScreen] bounds];
CGSize screenSize = screenBound.size;
NSLog(@"%@",NSStringFromCGSize(screenSize));
if (screenSize.height == 568.0f) {
NSLog(@"iphone 5");
}else if(screenSize.height == 480.0f){
NSLog(@"iphone 4 retina");
}else{
NSLog(@"iphone 4 non retina");
}
You should also consider using UIDevice's userInterfaceIdiom
to check whether the device is iPhone/iPad, and UIScreen's scale
to determine whether the device is retina or not.