#define DEVICE_IS_IPHONE5 ([[UIScreen mainScreen] bounds].size.height == 568)
float height = DEVICE_IS_IPHONE5?568:480;
if (height == 568) {
// 4"
} else {
// 3"
}
http://*.com/questions/12395200/how-to-develop-or-migrate-apps-for-iphone-5-screen-resolution/16914009#16914009