2011-10-05 4 views
0

iPhone/iPod Touch에서 내 응용 프로그램에 openfeint를 성공적으로 통합했습니다. 그러나 레이아웃은 iPad에서 깨졌습니다. openfeint에서 샘플 앱의 코드를 복사합니다.openfeint를 cocos2d ipad 레이아웃에 통합합니다.

- (void) performOpenfeintInitLogic 
{ 
    UIViewController * rootVC = [UIApplication sharedApplication].keyWindow.rootViewController; 
    NSDictionary* settings = [NSDictionary dictionaryWithObjectsAndKeys: 
           [NSNumber numberWithInt:UIInterfaceOrientationPortrait], OpenFeintSettingDashboardOrientation, 
           @"asdasdasdas", OpenFeintSettingShortDisplayName, 
           [NSNumber numberWithBool:YES], OpenFeintSettingEnablePushNotifications, 
           [NSNumber numberWithBool:NO], OpenFeintSettingDisableUserGeneratedContent, 
           [NSNumber numberWithBool:NO], OpenFeintSettingAlwaysAskForApprovalInDebug, 
#ifdef DEBUG 
           [NSNumber numberWithInt:OFDevelopmentMode_DEVELOPMENT], OpenFeintSettingDevelopmentMode, 
#else 
           [NSNumber numberWithInt:OFDevelopmentMode_RELEASE], OpenFeintSettingDevelopmentMode, 
#endif 
           window, OpenFeintSettingPresentationWindow, 
#ifdef DEBUG 
           [NSNumber numberWithInt:OFDevelopmentMode_DEVELOPMENT], OpenFeintSettingDevelopmentMode, 
#else 
           [NSNumber numberWithInt:OFDevelopmentMode_RELEASE], OpenFeintSettingDevelopmentMode, 
#endif 
           nil 
           ];  
    [OpenFeint initializeWithProductKey:@"hgghf" 
           andSecret:@"nbvnb" 
         andDisplayName:@"ncvnv" 
          andSettings:settings 
          andDelegates:nil]; 

    [OpenFeint launchDashboard]; 

    OFGameFeedView * gameFeed = [OFGameFeedView gameFeedView]; 
    [rootVC.view addSubview:gameFeed]; 
} 

여기에 깨진 레이아웃이 구성 지금 실행 iPad broken layout

답변

0

그것. 오류가 잘못된 번들입니다. 이것이 바로 OFResources_Universal.bundle입니다.

는 config는 지금 :

UIViewController * rootVC = [UIApplication sharedApplication].keyWindow.window.rootViewController; 
    NSDictionary* settings = [NSDictionary dictionaryWithObjectsAndKeys: 
           [NSNumber numberWithInt:UIInterfaceOrientationLandscapeRight], OpenFeintSettingDashboardOrientation, 
           @"asdasdads", OpenFeintSettingShortDisplayName, 
           [NSNumber numberWithBool:YES], OpenFeintSettingGameCenterEnabled, 
           [NSNumber numberWithBool:YES], OpenFeintSettingEnablePushNotifications, 
           [NSNumber numberWithBool:NO], OpenFeintSettingDisableUserGeneratedContent, 
           [NSNumber numberWithBool:NO], OpenFeintSettingAlwaysAskForApprovalInDebug, 
#ifdef DEBUG 
           [NSNumber numberWithInt:OFDevelopmentMode_DEVELOPMENT], OpenFeintSettingDevelopmentMode, 
#else 
           [NSNumber numberWithInt:OFDevelopmentMode_RELEASE], OpenFeintSettingDevelopmentMode, 
#endif 
           rootVC, OpenFeintSettingPresentationWindow, 
#ifdef DEBUG 
           [NSNumber numberWithInt:OFDevelopmentMode_DEVELOPMENT], OpenFeintSettingDevelopmentMode, 
#else 
           [NSNumber numberWithInt:OFDevelopmentMode_RELEASE], OpenFeintSettingDevelopmentMode, 
#endif 
           nil 
           ];  
    [OpenFeint initializeWithProductKey:@"asdasdas" 
           andSecret:@"asdasdasd" 
         andDisplayName:@"asdasdsad" 
          andSettings:settings 
          andDelegates:nil];