Skip to content

Commit

Permalink
Merge pull request #13 from bernhardwaidacher/master
Browse files Browse the repository at this point in the history
Thanks for your contribution. The code is merged now.
  • Loading branch information
sarriaroman committed Feb 1, 2016
2 parents 0c24990 + 040b1d7 commit 6cea2bf
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/ios/PhotoViewer.m
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,16 @@ - (UIViewController *) documentInteractionControllerViewControllerForPreview:(UI

- (void)show:(CDVInvokedUrlCommand*)command
{
UIActivityIndicatorView *activityIndicator = [[UIActivityIndicatorView alloc] initWithFrame:self.viewController.view.frame];
[activityIndicator setActivityIndicatorViewStyle:UIActivityIndicatorViewStyleWhiteLarge];
[activityIndicator.layer setBackgroundColor:[[UIColor colorWithWhite:0.0 alpha:0.30] CGColor]];
CGPoint center = self.viewController.view.center;
activityIndicator.center = center;
[self.viewController.view addSubview:activityIndicator];

[activityIndicator startAnimating];


CDVPluginResult* pluginResult = nil;
NSString* url = [command.arguments objectAtIndex:0];
NSString* title = [command.arguments objectAtIndex:1];
Expand All @@ -60,6 +70,7 @@ - (void)show:(CDVInvokedUrlCommand*)command
double delayInSeconds = 0.1;
dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, delayInSeconds * NSEC_PER_SEC);
dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
[activityIndicator stopAnimating];
[self.docInteractionController presentPreviewAnimated:YES];
});
}
Expand Down

0 comments on commit 6cea2bf

Please sign in to comment.