当前集成的Nextpeer资源包不支持所需的方向(1)

时间:2014-07-21 08:16:21

标签: ios cocoa nextpeer

我在Nextpeer中使用Cocos进行多人游戏,并希望为NextpeerSettingInitialDashboardOrientation设置纵向方向。我正在使用此代码:

 NSDictionary* settings = [NSDictionary dictionaryWithObjectsAndKeys:
                              [NSNumber numberWithBool:FALSE], NextpeerSettingSupportsDashboardRotation,
                              [NSNumber numberWithInt:NPNotificationPosition_BOTTOM], NextpeerSettingNotificationPosition,
                              [NSNumber numberWithBool:FALSE], NextpeerSettingInitialDashboardOrientation,
                              nil];

[Nextpeer initializeWithProductKey:@"ID" andSettings:settings andDelegates:
 [NPDelegatesContainer containerWithNextpeerDelegate:self notificationDelegate:nil tournamentDelegate:self currencyDelegate:nil]];

但我收到警告,我的方向未设为portrait。它将其设置为Landscape。我的默认方向为portrait

Nextpeer warning: The desired orientation (1) isn't supported by the currently integrated Nextpeer's resource bundle.
  • 如何更改 NextpeerSettingSupportsDashboardRotation

  • 如何解决此警告?

1 个答案:

答案 0 :(得分:0)

Nextpeer根据您的项目方向和普遍支持提供不同的资源包。 您需要确保集成了对应的资源包。例如,如果您的环境是通用的,那么您需要按照iOS集成指南中的说明在项目中设置NPResources_iPad_iPhone_Landscape包。

为了将NextpeerSettingSupportsDashboardRotation值更改为TRUE,只需更改对象值,如下所示:

 NSDictionary* settings = [NSDictionary dictionaryWithObjectsAndKeys:
                          [NSNumber numberWithBool:TRUE], NextpeerSettingSupportsDashboardRotation,
                          [NSNumber numberWithInt:NPNotificationPosition_BOTTOM], NextpeerSettingNotificationPosition,
                          [NSNumber numberWithBool:FALSE], NextpeerSettingInitialDashboardOrientation,
                          nil];