iPhone5의 4 인치 화면에 맞게 iOS5 SDK를 사용하여 만든 내 앱을 업데이트하고 싶습니다. 나는 iPhone5 시뮬레이터로 시뮬레이션한다. 다음 코드는 화면 높이가 여전히 480.00이지만 548이 아니라는 것을 알려줍니다. iPhone5의 4 인치 화면 하단에 검은 색 틈이없는 내 응용 프로그램을 높이려면 어떻게해야합니까? 어떤 도움에 감사드립니다 :)4 인치 화면 iPhone4 화면 높이
- (void)viewDidLoad
{
[super viewDidLoad];
float screenHeight = [UIScreen mainScreen].bounds.size.height;
NSLog(@"screenHeight :%f",screenHeight);
}
로그 : iPhone 및 iPad 용
2012-09-20 14:47:36.554 FF[61898:c07] screenHeight :480.000000
흠, 이상한. 나는이 코드의 평화를 사용합니다 : CGRect frame = [UIScreen mainScreen] .bounds; NSLog (@ "Width = % f", frame.size.width); NSLog (@ "Height = % f", frame.size.height); Width = 320, Height = 568; iOS Simulator에서 iPhone Retina 4 Inch를 사용하도록 설정 했습니까? – uerceg