다음과 같은 최신 xcode로 업데이트 한 이후로 어떤 이유로 아이폰 OS 8. 그것은 나던 당신은 당신이 당신의 프로젝트에 [email protected]
로라는 이름의 실행 이미지를 추가 할 필요가 이러한 목적을 위해 아이폰 5에 대한 지원을 추가 할 필요가 ([[UIScreen mainScreen] scale] == 2.0)
&([[UIScreen mainScreen] scale] == 2.0) & ([[UIScreen mainScreen] bounds) .size.height == 568.0) 작동하지 않습니다.
([[UIScreen mainScreen] bounds].size.height == 568.0)
// Indicates game is running on iPad
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
CCLOG(@"Running on iPad");
// it doesn´t recognize this any more
if ([[UIScreen mainScreen] scale] == 2.0) {
CCLOG(@"Running on iPad Retina");
} else {
CCLOG(@"Running on iPad 2");
}
} else {
CCLOG(@"Running on iPhone");
// it doesn´t recognize this any more
if ([[UIScreen mainScreen] bounds].size.height == 568.0) {
CCLOG(@"Running on iPhone 5");
} else {
CCLOG(@"Running on iPhone 4/4S");
}
}
에 이전 요청합니다 = 468
높이가 사용한 않았다 즉 호환성 모드에서 응용 프로그램을 실행? iPad Retina에서이 [[UIScreen mainScreen] scale] == 2.0'을 시도 했습니까? –
엡실론없이 부동 소수점 수를 비교하지 마십시오;). Dunno는 여기에 오류가 있지만 절대해서는 안됩니다. – HAS
@WaqasRaja 나는 모든 시뮬레이터를 시험해 보았다. ipad 2, ipad air, ipad retina, iphone 4s, iphone 5, iphone 5s, iphone 6, iphone 6 plus. ipad에서 실행할 때, 모두 ipad 2 부분으로 이동합니다. 아이폰에서 실행 중일 때는 모두 아이폰 4/4 부분으로 이동합니다. – Chris79