Advertisement
Guest User

Untitled

a guest
Sep 5th, 2015
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. PHImageRequestOptions *options = [[PHImageRequestOptions alloc] init];
  2. options.deliveryMode = PHVideoRequestOptionsDeliveryModeHighQualityFormat;
  3. options.networkAccessAllowed = YES;
  4.  
  5. [[PHImageManager defaultManager] requestImageDataForAsset:asset
  6. options:options
  7. resultHandler:^(NSData * _Nullable imageData, NSString * _Nullable dataUTI, UIImageOrientation orientation, NSDictionary * _Nullable info) {
  8.  
  9. NSURL *fileURL = info [@"PHImageFileURLKey"];
  10.  
  11. UIDocumentInteractionController *controller = [UIDocumentInteractionController interactionControllerWithURL:fileURL];
  12. CGRect navRect = self.view.frame;
  13.  
  14. self.controller = controller;
  15.  
  16. [self.controller presentOptionsMenuFromRect:navRect inView:self.view animated:YES];
  17. }];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement