Guest User

Untitled

a guest
Jan 18th, 2019
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. NSLog(@"%@", _imgToUpload);
  2. NSURL *instagramURL = [NSURL URLWithString:@"instagram://app"];
  3. if ([[UIApplication sharedApplication] canOpenURL:instagramURL]) {
  4. uidController = [[UIDocumentInteractionController alloc] init];
  5. //imageToUpload is a file path with .igo file extension
  6. uidController = [UIDocumentInteractionController interactionControllerWithURL:[NSURL fileURLWithPath:_imgToUpload]];
  7. uidController.UTI = @"com.instagram.exclusivegram";
  8. uidController.delegate = self;
  9. CGRect navRect = self.view.frame;
  10. [uidController presentOpenInMenuFromRect:navRect inView:[UIApplication sharedApplication].keyWindow animated:YES];
  11. NSLog(@"here in");
  12. }
Add Comment
Please, Sign In to add comment