GKScore.ChallengeComposeControllerAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
ChallengeComposeControllerAsync(String, GKPlayer[]) |
Provides a view controller that can be used to send a challenge, with a message, to other players. |
ChallengeComposeControllerAsync(String, GKPlayer[], NSViewController) | |
ChallengeComposeControllerAsync(String, GKPlayer[], UIViewController) |
Asynchronously provides a view controller that can be used to send a challenge, with a message, to other players, returning a task that provides the challenge result. |
ChallengeComposeControllerAsync(String, GKPlayer[])
Provides a view controller that can be used to send a challenge, with a message, to other players.
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 8, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual System.Threading.Tasks.Task<GameKit.GKChallengeComposeResult> ChallengeComposeControllerAsync (string message, GameKit.GKPlayer[] players);
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.MacOSX, 10, 10, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual System.Threading.Tasks.Task<GameKit.GKChallengeComposeResult> ChallengeComposeControllerAsync (string message, GameKit.GKPlayer[] players);
abstract member ChallengeComposeControllerAsync : string * GameKit.GKPlayer[] -> System.Threading.Tasks.Task<GameKit.GKChallengeComposeResult>
override this.ChallengeComposeControllerAsync : string * GameKit.GKPlayer[] -> System.Threading.Tasks.Task<GameKit.GKChallengeComposeResult>
Parameters
- message
- String
An editable message to display to the other players. May be .
- players
- GKPlayer[]
The players to challenge.
Returns
A task that represents the asynchronous ChallengeComposeController operation. The value of the TResult parameter is of type Action<GameKit.GKChallengeComposeResult>
.
- Attributes
Remarks
The ChallengeComposeControllerAsync method is suitable to be used with C# async by returning control to the caller with a Task representing the operation.
To be added.
Applies to
ChallengeComposeControllerAsync(String, GKPlayer[], NSViewController)
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.MacOSX, 10, 10, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual System.Threading.Tasks.Task<GameKit.GKChallengeComposeResult> ChallengeComposeControllerAsync (string message, GameKit.GKPlayer[] players, out AppKit.NSViewController result);
abstract member ChallengeComposeControllerAsync : string * GameKit.GKPlayer[] * -> System.Threading.Tasks.Task<GameKit.GKChallengeComposeResult>
override this.ChallengeComposeControllerAsync : string * GameKit.GKPlayer[] * -> System.Threading.Tasks.Task<GameKit.GKChallengeComposeResult>
Parameters
- message
- String
- players
- GKPlayer[]
- result
- NSViewController
Returns
- Attributes
Applies to
ChallengeComposeControllerAsync(String, GKPlayer[], UIViewController)
Asynchronously provides a view controller that can be used to send a challenge, with a message, to other players, returning a task that provides the challenge result.
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 8, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual System.Threading.Tasks.Task<GameKit.GKChallengeComposeResult> ChallengeComposeControllerAsync (string message, GameKit.GKPlayer[] players, out UIKit.UIViewController result);
abstract member ChallengeComposeControllerAsync : string * GameKit.GKPlayer[] * -> System.Threading.Tasks.Task<GameKit.GKChallengeComposeResult>
override this.ChallengeComposeControllerAsync : string * GameKit.GKPlayer[] * -> System.Threading.Tasks.Task<GameKit.GKChallengeComposeResult>
Parameters
- message
- String
An editable message to display to the other players. May be null
.
- players
- GKPlayer[]
The players to challenge.
- result
- UIViewController
The view controller that displays the result of the challenge. May be null
.
Returns
- Attributes