<tfoot id='6Kl1U'></tfoot>
    • <bdo id='6Kl1U'></bdo><ul id='6Kl1U'></ul>
    1. <legend id='6Kl1U'><style id='6Kl1U'><dir id='6Kl1U'><q id='6Kl1U'></q></dir></style></legend>
      <i id='6Kl1U'><tr id='6Kl1U'><dt id='6Kl1U'><q id='6Kl1U'><span id='6Kl1U'><b id='6Kl1U'><form id='6Kl1U'><ins id='6Kl1U'></ins><ul id='6Kl1U'></ul><sub id='6Kl1U'></sub></form><legend id='6Kl1U'></legend><bdo id='6Kl1U'><pre id='6Kl1U'><center id='6Kl1U'></center></pre></bdo></b><th id='6Kl1U'></th></span></q></dt></tr></i><div id='6Kl1U'><tfoot id='6Kl1U'></tfoot><dl id='6Kl1U'><fieldset id='6Kl1U'></fieldset></dl></div>

        <small id='6Kl1U'></small><noframes id='6Kl1U'>

        排行榜没有添加到屏幕 cocos2d

        Leaderboard doesn#39;t add in the screen cocos2d(排行榜没有添加到屏幕 cocos2d)

        • <bdo id='WaP9j'></bdo><ul id='WaP9j'></ul>

          <small id='WaP9j'></small><noframes id='WaP9j'>

            <tfoot id='WaP9j'></tfoot>
            <i id='WaP9j'><tr id='WaP9j'><dt id='WaP9j'><q id='WaP9j'><span id='WaP9j'><b id='WaP9j'><form id='WaP9j'><ins id='WaP9j'></ins><ul id='WaP9j'></ul><sub id='WaP9j'></sub></form><legend id='WaP9j'></legend><bdo id='WaP9j'><pre id='WaP9j'><center id='WaP9j'></center></pre></bdo></b><th id='WaP9j'></th></span></q></dt></tr></i><div id='WaP9j'><tfoot id='WaP9j'></tfoot><dl id='WaP9j'><fieldset id='WaP9j'></fieldset></dl></div>

              <tbody id='WaP9j'></tbody>

                  <legend id='WaP9j'><style id='WaP9j'><dir id='WaP9j'><q id='WaP9j'></q></dir></style></legend>
                  本文介绍了排行榜没有添加到屏幕 cocos2d的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  I used the code below to show the Leaderboard but all i got it the console this

                  cocos2d: surface size: 480x320
                  

                  the code:

                  - (void)showLeaderboardForCategory:(NSString *)category
                  {
                      // Only execute if OS supports Game Center & player is logged in
                      if (hasGameCenter)
                      {    
                  
                          // Create leaderboard view w/ default Game Center style
                          GKLeaderboardViewController *leaderboardController = [[GKLeaderboardViewController alloc] init];
                  
                          // If view controller was successfully created...
                          if (leaderboardController != nil)
                          {
                              // Leaderboard config
                              leaderboardController.leaderboardDelegate = self;   // The leaderboard view controller will send messages to this object
                              leaderboardController.category = category;  // Set category here
                              leaderboardController.timeScope = GKLeaderboardTimeScopeAllTime;    // GKLeaderboardTimeScopeToday, GKLeaderboardTimeScopeWeek, GKLeaderboardTimeScopeAllTime
                  
                              // Create an additional UIViewController to attach the GKLeaderboardViewController to
                              myViewController = [[UIViewController alloc] init];
                  
                              // Add the temporary UIViewController to the main OpenGL view
                              [[[CCDirector sharedDirector] openGLView] addSubview:myViewController.view];
                  
                              // Tell UIViewController to present the leaderboard
                              [myViewController presentModalViewController:leaderboardController animated:YES];
                          }
                      }
                  }
                  

                  Finally I called the code like this :

                      [[GameCenterManager sharedGameCenterManager] showLeaderboardForCategory:@"LeaderBoard"];
                  

                  解决方案

                  I found the solution I must write :

                      [[[[CCDirector sharedDirector] openGLView] window] addSubview:myViewController.view];
                  

                  instead of :

                      [[[CCDirector sharedDirector] openGLView] addSubview:myViewController.view];
                  

                  这篇关于排行榜没有添加到屏幕 cocos2d的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Hardware Volume buttons change in app volume(硬件音量按钮更改应用程序音量)
                  Cocos2d - How to check for Intersection between objects in different layers(Cocos2d - 如何检查不同层中对象之间的交集)
                  Resume game cocos2d(恢复游戏 cocos2d)
                  Highlight Read-Along Text (in a storybook type app for iPhone)(突出显示朗读文本(在 iPhone 的故事书类型应用程序中))
                  Cocos2D + Disabling only Retina iPad Graphics(Cocos2D + 仅禁用 Retina iPad 图形)
                  Proper cocos2d scene restart?(正确的 cocos2d 场景重启?)

                  <small id='GdXcR'></small><noframes id='GdXcR'>

                  • <legend id='GdXcR'><style id='GdXcR'><dir id='GdXcR'><q id='GdXcR'></q></dir></style></legend>

                  • <i id='GdXcR'><tr id='GdXcR'><dt id='GdXcR'><q id='GdXcR'><span id='GdXcR'><b id='GdXcR'><form id='GdXcR'><ins id='GdXcR'></ins><ul id='GdXcR'></ul><sub id='GdXcR'></sub></form><legend id='GdXcR'></legend><bdo id='GdXcR'><pre id='GdXcR'><center id='GdXcR'></center></pre></bdo></b><th id='GdXcR'></th></span></q></dt></tr></i><div id='GdXcR'><tfoot id='GdXcR'></tfoot><dl id='GdXcR'><fieldset id='GdXcR'></fieldset></dl></div>
                          <tbody id='GdXcR'></tbody>
                        <tfoot id='GdXcR'></tfoot>
                            <bdo id='GdXcR'></bdo><ul id='GdXcR'></ul>