Contents

peerPickerController(_:didSelect:)

Tells the delegate that the user selected a connection type.

Declaration

optional func peerPickerController(_ picker: GKPeerPickerController, didSelect type: GKPeerPickerConnectionType)

Parameters

  • picker:

    The controller for the peer picker dialog.

  • type:

    The type of network connection chosen by the user.

Discussion

If the peer picker is configured to allow users to choose between multiple connection types, this method is called when users select the connection type they want to use. Your delegate implements this method if you want to override the behavior for a particular connection type.

- (void)peerPickerController:(GKPeerPickerController *)picker didSelectConnectionType:(GKPeerPickerConnectionType)type {
    if(type == GKPeerPickerConnectionTypeOnline) {
        [picker dismiss];
        [picker autorelease];
// Display your own user interface here.
}

See Also

Creating a Session for the Peer Picker