【问题标题】:Instagram iPhone hook - photo isn't exportedInstagram iPhone 挂钩 - 照片未导出
【发布时间】:2012-12-15 08:45:36
【问题描述】:

你能告诉我,我做错了什么,照片没有显示在新的 Instagram 中吗?它根本不在那里导出。

编辑:我看到的问题是它没有显示在 Instagram 的预览中。当我去“下一步”时,会看到一个缩略图。如果重要的话,我的输出图片是 1000x1000。

NSString *savePath = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/Image.igo"];

// Write image to PNG
[UIImageJPEGRepresentation(preview.image, 1.0) writeToFile:savePath atomically:YES];

NSURL *instagramURL = [NSURL URLWithString:@"instagram://app"];

if ([[UIApplication sharedApplication] canOpenURL:instagramURL]) 
{
    //imageToUpload is a file path with .ig file extension
    documentInteractionController = [UIDocumentInteractionController interactionControllerWithURL:[NSURL fileURLWithPath:savePath]];

    documentInteractionController.UTI = @"com.instagram.exclusivegram";
    documentInteractionController.delegate = self;

    documentInteractionController.annotation = [NSDictionary dictionaryWithObject:@"bla bla bla" forKey:@"InstagramCaption"];
    [documentInteractionController presentOpenInMenuFromRect:CGRectZero inView:self.view animated:YES];

【问题讨论】:

    标签: iphone objective-c xcode instagram


    【解决方案1】:
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多