Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UIImage *instaImage = [UIImage imageNamed:@"imagetoShare.png"];
- NSString* imagePath = [NSString stringWithFormat:@"%@/image.igo",[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,
- NSUserDomainMask, YES) lastObject]];
- [[NSFileManager defaultManager] removeItemAtPath:imagePath error:nil];
- [UIImagePNGRepresentation(instaImage) writeToFile:imagePath atomically:YES];
- UIDocumentInteractionController *_docController = [UIDocumentInteractionController interactionControllerWithURL:
- [NSURL fileURLWithPath:imagePath]];
- _docController.UTI = @"com.instagram.exclusivegram";
- [_docController presentOpenInMenuFromRect:self.view.frame inView:self.view animated:YES];
Add Comment
Please, Sign In to add comment