GKMatchmaker.matchForInvite的Swift语法

GKMatchmaker.matchForInvite的Swift语法,swift,game-center,multiplayer,Swift,Game Center,Multiplayer,有人知道如何正确编写游戏中心邀请处理吗?我想不出这行的正确语法: GKMatchmaker.matchForInvite (Invitation:GKInvite!, completionHandler ..... 请帮帮我,我卡住了 我知道这是个老生常谈的问题,但我刚刚遇到它,我想我会拿出我的两分钱 这就是我实现该功能的方式 GKMatchmaker.sharedMatchmaker().matchForInvite(invite, completionHandler: { (match:

有人知道如何正确编写游戏中心邀请处理吗?我想不出这行的正确语法:

GKMatchmaker.matchForInvite (Invitation:GKInvite!, completionHandler .....

请帮帮我,我卡住了

我知道这是个老生常谈的问题,但我刚刚遇到它,我想我会拿出我的两分钱

这就是我实现该功能的方式

GKMatchmaker.sharedMatchmaker().matchForInvite(invite, completionHandler: { (match: GKMatch!, error: NSError!) -> Void in

   if error != nil {
      // error out
   }

   if match != nil {

      // success   
   }
 })