Ios 游戏中心排行榜未被驳回

Ios 游戏中心排行榜未被驳回,ios,xcode,game-center,Ios,Xcode,Game Center,我在我的应用程序中实现了游戏中心,一切都进行得很顺利,除了排行榜完成按钮没有取消排行榜,即使添加了GameCenterControllerdFinish。我只需点击.m文件中的按钮即可调出排行榜,如下所示: - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches anyObject]; CGPoint location = [touch locatio

我在我的应用程序中实现了游戏中心,一切都进行得很顺利,除了排行榜完成按钮没有取消排行榜,即使添加了GameCenterControllerdFinish。我只需点击.m文件中的按钮即可调出排行榜,如下所示:

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
    UITouch *touch = [touches anyObject];
    CGPoint location = [touch locationInNode:self];
    SKNode *node = [self nodeAtPoint:location];



     if ([node.name isEqualToString:@"rankButton"]) {

        [self runAction:[SKAction playSoundFileNamed:@"fishtran.m4a" waitForCompletion: NO]];
         GKGameCenterViewController *gameCenterController = [[GKGameCenterViewController alloc] 
    init];
            if (gameCenterController != nil)
       {

            gameCenterController.viewState = GKGameCenterViewControllerStateAchievements;
            UIViewController *vc = self.view.window.rootViewController;
            [vc presentViewController: gameCenterController animated: YES completion:nil];
        }
    } else if ([node.name isEqualToString:@"Leaderboard"]) {
        GKGameCenterViewController *gameCenterController = [[GKGameCenterViewController alloc]  
init];
        if (gameCenterController != nil)
        {

            gameCenterController.viewState = GKGameCenterViewControllerStateLeaderboards;
            UIViewController *vc = self.view.window.rootViewController;
            [vc presentViewController: gameCenterController animated: YES completion:nil];
        }
    }
 ...
然后我立即添加了GameCenterControllerdFinish,如下所示:

- (void)gameCenterControllerDidFinish:(GKGameCenterViewController*)gameCenterController {

    UIViewController *vc = self.view.window.rootViewController;
    [vc dismissViewControllerAnimated:YES completion:nil];
}
“完成”按钮仍然不起作用,我还没有找到任何解决方案。是的,我的.h文件中确实有GKGameCenterControllerDelegate。任何帮助都将不胜感激,谢谢