Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New photobrowser delegate method. User can track which sharing option… #157

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Classes/IDMPhotoBrowser.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
- (void)photoBrowser:(IDMPhotoBrowser *)photoBrowser willDismissAtPageIndex:(NSUInteger)index;
- (void)photoBrowser:(IDMPhotoBrowser *)photoBrowser didDismissActionSheetWithButtonIndex:(NSUInteger)buttonIndex photoIndex:(NSUInteger)photoIndex;
- (IDMCaptionView *)photoBrowser:(IDMPhotoBrowser *)photoBrowser captionViewForPhotoAtIndex:(NSUInteger)index;
- (void)photoBrowser:(IDMPhotoBrowser *)photoBrowser activityViewControllerActivitySelected:(NSString *)activityType itemsReturned:(NSArray *)returnedItems withError:(NSError *)activityError;

@end

// IDMPhotoBrowser
Expand Down
6 changes: 4 additions & 2 deletions Classes/IDMPhotoBrowser.m
Original file line number Diff line number Diff line change
Expand Up @@ -1267,14 +1267,16 @@ - (void)actionButtonPressed:(id)sender {
{
[self.activityViewController setCompletionWithItemsHandler:^(NSString *activityType, BOOL completed, NSArray *returnedItems, NSError *activityError) {
[selfBlock hideControlsAfterDelay];
selfBlock.activityViewController = nil;
selfBlock.activityViewController = nil;
[_delegate photoBrowser:self activityViewControllerActivityTypeSelected:activityType itemsReturned:returnedItems withError:activityError];
}];
}
else
{
[self.activityViewController setCompletionHandler:^(NSString *activityType, BOOL completed) {
[selfBlock hideControlsAfterDelay];
selfBlock.activityViewController = nil;
selfBlock.activityViewController = nil;
[_delegate photoBrowser:self activityViewControllerActivityTypeSelected:activityType itemsReturned:returnedItems withError:activityError];
}];
}

Expand Down