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];
}
여기에 깨진 레이아웃이 구성 지금 실행