Skip to content
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Move the completion block assignment before the presentation of the p…
…opover.
  • Loading branch information
adonoho committed Nov 18, 2014
commit ce0fae22bc1882e031b7bb48bb73cd1873a2d0d4
7 changes: 3 additions & 4 deletions SVWebViewController/SVWebViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -396,14 +396,13 @@ - (void) actionButtonClicked: (UIBarButtonItem *) sender {
pc = [UIPopoverController.alloc initWithContentViewController: avc];

pc.popoverContentSize = avc.preferredContentSize;

[pc presentPopoverFromBarButtonItem: sender
permittedArrowDirections: UIPopoverArrowDirectionAny
animated: YES];
avc.completionHandler = ^(NSString *activityType, BOOL completed) {

[pc dismissPopoverAnimated: YES];
};
[pc presentPopoverFromBarButtonItem: sender
permittedArrowDirections: UIPopoverArrowDirectionAny
animated: YES];
}
else {

Expand Down