gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-03 17:21:33 25 4
gpt4 key购买 nike

我在 Cocos 中使用 Nextpeer 进行多人游戏,并希望为 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]];

但我收到此警告,并且我的方向未设置为纵向。它将其设置为横向。我的默认方向是纵向

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

  • 如何解决此警告?

最佳答案

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

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

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

关于ios - 当前集成的 Nextpeer 资源包不支持所需的方向 (1),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24860466/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com