2014-11-09 6 views
0

Iphone과 Ipad의 스토리 보드가로드되고 아이폰의 스토리 보드가로드되지만 Ipad 시뮬레이터를 시작할 때 "어플리케이션 창이 예상됩니다." .. "오류가 발생했습니다. Ipad의 스토리 보드로드시

은 AppDelegate에있는 코드 :

@implementation AppDelegate 

- (UIStoryboard *)grabStoryboard { 

    UIStoryboard *storyboard; 

    // detect the height of our screen 
    int height = [UIScreen mainScreen].bounds.size.height; 

    if (height == 480) { 
     storyboard = [UIStoryboard storyboardWithName:@"Storyboard_Iphone3" bundle:nil]; 
     // NSLog(@"Device has a 3.5inch Display."); 
    } 

    if (height >= 1024 && height <= 2048) { 
     storyboard = [UIStoryboard storyboardWithName:@"Storyboard_Ipad" bundle:nil]; 
     NSLog(@"Device has a 4inch Display."); 
    } 

    else { 
     storyboard = [UIStoryboard storyboardWithName:@"Storyboard_Iphone4Up" bundle:nil]; 
     // NSLog(@"Device has a 4inch Display."); 
    } 

    return storyboard; 
} 


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 
{ 
    UIStoryboard *storyboard = [self grabStoryboard]; 

    // show the storyboard 
    self.window.rootViewController = [storyboard instantiateInitialViewController]; 
    [self.window makeKeyAndVisible]; 
    return YES; 
} 

콘솔에서 나는 NSLog 메시지를 볼 수 있지만 스토리 보드가로드되지 않습니다 "응용 프로그램 창을 ..."오류가 나타납니다.

일부 Scroll Views와 일부 요소를 사용하고 있지만 "Adjust Scroll View Insets"옵션이 있으므로 문제가되지 않는다고 생각합니다.

내 프로젝트에 대해 더 자세히 보여주기 위해 일부 스크린 샷을 업로드했습니다. 시간 내 줘서 고마워. enter image description here enter image description here

답변

0

enter image description here

나는 그것을 알아 냈다. Iphone 스토리 보드의 모든 항목을 Ipad로 복사하면 초기보기 컨트롤러 확인란이 선택 취소됩니다. 확인 만하면 모두 좋을 것입니다 (: