Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NSLog(@"%@", _imgToUpload);
- NSURL *instagramURL = [NSURL URLWithString:@"instagram://app"];
- if ([[UIApplication sharedApplication] canOpenURL:instagramURL]) {
- uidController = [[UIDocumentInteractionController alloc] init];
- //imageToUpload is a file path with .igo file extension
- uidController = [UIDocumentInteractionController interactionControllerWithURL:[NSURL fileURLWithPath:_imgToUpload]];
- uidController.UTI = @"com.instagram.exclusivegram";
- uidController.delegate = self;
- CGRect navRect = self.view.frame;
- [uidController presentOpenInMenuFromRect:navRect inView:[UIApplication sharedApplication].keyWindow animated:YES];
- NSLog(@"here in");
- }
Add Comment
Please, Sign In to add comment