我使用需要被允許,以適應iPhone 5的屏幕,但是我似乎無法得到正確的佈局視圖幫助,我已經嘗試了這一點;與iPhone 5視圖佈局
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone)
{
if (IS_IPHONE5) {
NSLog(@"iPhone 5");
[SelectionPhotoOptionView setFrame:CGRectMake(470, 0, 640, 568)];
[SelectionButView setFrame:CGRectMake(0, 0, 640, 568)];
[imageViewSelection setFrame:CGRectMake(0, 0, 640, 568)];
[imageViewPhotoOption setFrame:CGRectMake(-470, 0, 640, 568)];
ButtonYpos=612;
} else {
NSLog(@"iPhone 4 and Lower");
[SelectionPhotoOptionView setFrame:CGRectMake(470, 0, 320, 480)];
[SelectionButView setFrame:CGRectMake(0, 0, 320, 480)];
[imageViewSelection setFrame:CGRectMake(0, 0, 320, 480)];
[imageViewPhotoOption setFrame:CGRectMake(-470, 0, 320, 480)];
ButtonYpos=412;
}
頂部是錯誤的,iPhone 5是不是制定了正確的,我不知道是否有人能幫助我了一個更簡潔的代碼示例使用?
謝謝, 克里斯