문제

I'm using UIActivityViewController for social sharing purposes, and I need to log what social network has being used. I know that I should use typedef void (^UIActivityViewControllerCompletionHandler)(NSString *activityType, BOOL completed); and activityType will give me the string that i need, but I don't know how to implement syntactically. Please, can anyone help me get the direction, I'm very newbie.

도움이 되었습니까?

해결책

Ok, for those who need syntax on how to get activityType

[yourUIActivityViewController setCompletionHandler:^(NSString *activityType, BOOL completed) {
        NSLog(@"activity: %@ isCompleted: %d", activityType, completed);
}];

based on very helpful answer and quick response of @Larme

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top