我正在使用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.发布于 2014-12-16 17:37:28
下一位基于您的项目方向和通用支持有不同的资源包。您需要确保集成了相应的资源包。例如,如果您是全局的,那么您需要按照NPResources_iPad_iPhone_Landscape集成指南中的指示在您的项目中设置iOS包。
为了将NextpeerSettingSupportsDashboardRotation值更改为TRUE,只需更改对象值如下:
NSDictionary* settings = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithBool:TRUE], NextpeerSettingSupportsDashboardRotation,
[NSNumber numberWithInt:NPNotificationPosition_BOTTOM], NextpeerSettingNotificationPosition,
[NSNumber numberWithBool:FALSE], NextpeerSettingInitialDashboardOrientation,
nil];https://stackoverflow.com/questions/24860466
复制相似问题