Guest User

Untitled

a guest
Jul 16th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. interactionController = [UIDocumentInteractionController interactionControllerWithURL:imageFile];
  2. interactionController.UTI = @"com.instagram.photo";
  3. interactionController.annotation = [NSDictionary dictionaryWithObject:[self commentForInstagram] forKey:@"InstagramCaption"];
  4. [interactionController presentOpenInMenuFromRect:self.view.frame inView:self.view animated:YES];
  5.  
  6. -(void)shareClick:(UIButton*)sender {
  7. /*some code*/
  8. CGRect rectForAppearing = [sender.superview convertRect:sender.frame toView:self.view];
  9. [interactionController presentOptionsMenuFromRect:rect inView:self.view animated:YES];
  10. }
  11.  
  12. [interactionController presentOptionsMenuFromRect:self.view.bounds inView:self.view animated:YES];
  13.  
  14. -(void)openDocument:(UIView*)senderView {
  15.  
  16. CGRect rectForAppearing = [senderView convertRect:senderView.frame toView:senderView];
  17.  
  18. if (isIPAD)
  19. rectForAppearing = CGRectMake(100, 100, rectForAppearing.size.width, rectForAppearing.size.height);
  20.  
  21. [interactionController presentOptionsMenuFromRect:rect inView:self.view animated:YES];
  22.  
  23. - (void)shareClick:(UIButton*)sender
  24. {
  25. /*some code*/
  26. [interactionController presentOptionsMenuFromRect:sender.bounds inView:sender animated:YES];
  27. }
Add Comment
Please, Sign In to add comment