Rate this page:

VIMessengerCompletion

Interface that represents a completion handler that is used to get results of methods such as [VIConversation update:], [VIMessenger getUserByName:completion:], etc.

A queue on which all events are received is specified via [VIClient initWithDelegateQueue:].

Methods

success:failure:

Static
Copy URL
+ (

instancetype

)success:(

void ( ^ ) ( ObjectType result )

)success
failure:(

void ( ^ ) ( VIErrorEvent * errorEvent )

)failure

Creates completion handler.

Parameters

  • success:

    void ( ^ ) ( ObjectType result )

    Triggered when a method call with the specified completion handler is successfully completed. ObjectType depends on the called method, e.g., it is VIUserEvent if [VIMessenger getUserByIMId:completion:] is called

  • failure:

    void ( ^ ) ( VIErrorEvent * errorEvent )

    Triggered when an error occurred as the method call result with the specified completion handler

Returns

  • type:

    instancetype