iOS 8 (iPhone 5) 프로그램을 iOS 8 (iPhone 5) 프로그램에서 테스트 할 때 Xcode 6을 사용하고 objective-C를 사용하지만 iOS에서 프로그램을 테스트하려고 할 때 7 (iPhone 5) 화면은 iPhone 4 화면처럼 보입니다. 이런 식으로 전화를 감지 할 수 있습니다.xcode iphone 5 화면에서 프로그램을 실행하면 화면이 보임 iphone 4
#define iPhone6Plus ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone && [UIScreen mainScreen].bounds.size.height == 736)
#define iPhone6 ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone && [UIScreen mainScreen].bounds.size.height == 667)
#define IS_IPHONE_5 ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone && [UIScreen mainScreen].bounds.size.height == 568)
#define IS_IPAD UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad
또한 이처럼 운영 체제를 감지 할 수 있습니다.
if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_7_0)
{
#define IS_IPHONE_5 ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone && [UIScreen mainScreen].bounds.size.height == 568)
}
내가 더 설명 아이폰 4 이미지 확인 등의 아이폰 OS 7 전화 화면 실행에 실행할 때 때문에 화면이 전화에 확장하지
. 당신은 상단과 하단 black.How을 볼 수 있듯이내가이 문제 아이폰 5 출시 화면을 설정
iPhone5 화면의 경우 default.png가 누락되었습니다. 추가하면 가장자리없이 예상대로 작동합니다. –
default.png가 없으며 iOS 8에서 실행할 때 이러한 검은 색 화면이 나타나지 않습니다. –
올바른 이미지를 포함해야합니다. 그렇지 않으면 아무 것도 보장되지 않습니다. 올바른 이미지가 없으면 경험하는 일이 발생합니다. –