IPhone4,4s和5的宽度一样,但是前两者高度是480,后者是568.所以判断当恰设备的高度就可以知道了
CGFloat screenHeight = [[UIScreen mainScreen] bounds].size.height;
if (screenHeight == 480) {
...
}
if (screenHeight == 568) {
...
}
IPhone4,4s和5的宽度一样,但是前两者高度是480,后者是568.所以判断当恰设备的高度就可以知道了
CGFloat screenHeight = [[UIScreen mainScreen] bounds].size.height;
if (screenHeight == 480) {
...
}
if (screenHeight == 568) {
...
}