objective-cevent-handlingcocos2d-iphoneios6

UIActivityViewControllerCompletionHandler How to?


I am trying to use the UIActivityViewControllerCompletionHandler , but i dont quite get how..

I want to detect when the user finishes or dismisses this view controller (UIActivityViewController).

Anyone knows how?


Solution

  • typedef void (^UIActivityViewControllerCompletionHandler)
        (NSString *activityType, BOOL completed);
    

    The second parameter of the completion handler tells you whether the user dismissed the controller. If they dismissed the controller, completed will be set to NO.

    There's more details in the completion handler's documentation.