2014-09-29 4 views
0

다음과 같은 최신 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"); 
    } 
} 
+0

에 이전 요청합니다 = 468

높이가 사용한 않았다 즉 호환성 모드에서 응용 프로그램을 실행? iPad Retina에서이 [[UIScreen mainScreen] scale] == 2.0'을 시도 했습니까? –

+0

엡실론없이 부동 소수점 수를 비교하지 마십시오;). Dunno는 여기에 오류가 있지만 절대해서는 안됩니다. – HAS

+0

@WaqasRaja 나는 모든 시뮬레이터를 시험해 보았다. ipad 2, ipad air, ipad retina, iphone 4s, iphone 5, iphone 5s, iphone 6, iphone 6 plus. ipad에서 실행할 때, 모두 ipad 2 부분으로 이동합니다. 아이폰에서 실행 중일 때는 모두 아이폰 4/4 부분으로 이동합니다. – Chris79

답변

0

인식 . 이 이미지없이 아이폰 OS는이 문제는 다른 질문

장치

how-to-add-iphone-5-large-screen-support-to-ios-apps-in-xcode

How to develop or migrate apps for iPhone 5 screen resolution?

+0

나는 그것을 안다. 이미 [email protected]라는 시작 이미지를 사용 중입니다. 나는 iOS 6 이후로 사용 해왔다. Xcode 5에서 Xcode 6으로 업데이트하기 전까지는 모든 것이 잘 동작했다. 문제가 시작되었다. – Chris79

+0

업데이트 : Xcode 5.1 및 [UIScreen mainScreen ] bounds] .size.height == 568.0은 완벽하게 작동하고있었습니다. Xcode 6에서이 문제의 원인은 무엇이며 어떻게 해결할 수 있습니까? – Chris79