有没有办法以编程方式拒绝 GameKit 中的回合制比赛?
在 GKTurnBasedMatch
中,每个 GKTurnBasedParticipant
都有一个 status
属性。我想将此属性设置为 GKTurnBasedParticipantStatusDeclined ;但是,它是只读的。我怎样才能以编程方式做到这一点?
据我所知,这只能通过 GKTurnBasedMatchmakerViewController 或清除邀请通知来完成。
In a GKTurnBasedMatch
, each GKTurnBasedParticipant
has a status
property. I would like to set this property to GKTurnBasedParticipantStatusDeclined
; however, it is read-only. How can I programmatically do this?
To my knowledge, it can only be done from the GKTurnBasedMatchmakerViewController
or by clearing an Invite notification.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 iOS 6.0 中,我们有了新的 GKTurnBasedMatch 方法
With iOS 6.0 we have new method of GKTurnBasedMatch
据我所知,您必须使用
-[GKTurnBasedMatch (void)participantQuitInTurnWithOutcome:(GKTurnBasedMatchOutcome)matchOutcome nextParticipant:(GKTurnBasedParticipant *)nextPlayer matchData:(NSData *)matchData finishHandler:(void (^)(NSError *error))completionHandler ]
这样做To my knowledge you have to use
-[GKTurnBasedMatch (void)participantQuitInTurnWithOutcome:(GKTurnBasedMatchOutcome)matchOutcome nextParticipant:(GKTurnBasedParticipant *)nextPlayer matchData:(NSData *)matchData completionHandler:(void (^)(NSError *error))completionHandler]
to do so