首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >当前集成的Nextpeer的资源包不支持所需的方向(1)

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

Stack Overflow用户
提问于 2014-07-21 08:16:20
回答 1查看 69关注 0票数 0

我正在使用NextpeerCocos中进行多人游戏,并希望为NextpeerSettingInitialDashboardOrientation设置肖像方向。我用了这个代码:

代码语言:javascript
复制
 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

代码语言:javascript
复制
Nextpeer warning: The desired orientation (1) isn't supported by the currently integrated Nextpeer's resource bundle.
  • 如何改变NextpeerSettingSupportsDashboardRotation?
  • 如何解决此警告?
EN

回答 1

Stack Overflow用户

发布于 2014-12-16 17:37:28

下一位基于您的项目方向和通用支持有不同的资源包。您需要确保集成了相应的资源包。例如,如果您是全局的,那么您需要按照NPResources_iPad_iPhone_Landscape集成指南中的指示在您的项目中设置iOS包。

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

代码语言:javascript
复制
 NSDictionary* settings = [NSDictionary dictionaryWithObjectsAndKeys:
                          [NSNumber numberWithBool:TRUE], NextpeerSettingSupportsDashboardRotation,
                          [NSNumber numberWithInt:NPNotificationPosition_BOTTOM], NextpeerSettingNotificationPosition,
                          [NSNumber numberWithBool:FALSE], NextpeerSettingInitialDashboardOrientation,
                          nil];
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/24860466

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档