0

iPhone/iPod Touch のアプリに openfeint を正常に統合しました。しかし、iPad ではレイアウトが壊れています。openfeint のサンプルアプリのコードをコピペしました。

- (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の壊れたレイアウト

4

1 に答える 1

0

この構成で現在実行されています。エラーは間違ったバンドルでした。これは正しいものです: OFResources_Universal.bundle.

構成は次のとおりです。

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];
于 2011-10-07T07:16:02.867 に答える