gpt4 book ai didi

iOS 发布到 Instagram 不工作

转载 作者:行者123 更新时间:2023-11-29 13:21:49 24 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
UIDocumentInteractionController no longer works in iOS6

我无法从我的应用打开 Instagram。这是我正在使用的代码:

NSString  *imageToUpload = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/mapapic-instagram.igo"];
NSData *imageData = UIImageJPEGRepresentation(image, 0.8);
[imageData writeToFile:imageToUpload atomically:YES];

_documentInteractionController
= [UIDocumentInteractionController interactionControllerWithURL:[NSURL fileURLWithPath:imageToUpload]];
_documentInteractionController.delegate = self;
_documentInteractionController.UTI = @"com.instagram.exclusivegram";
NSString *defaultInstagramText = @"Hello";

_documentInteractionController.annotation = @{ @"InstagramCaption" : defaultInstagramText };
BOOL success = [_documentInteractionController presentOpenInMenuFromRect:CGRectZero
inView:self.view.window
animated:YES];

最后一次调用返回 YES。然而什么也没有发生,Instagram 也没有打开。 UIDocumentInteractionControllerDelegate 方法未被调用。我安装了 Instagram 应用程序。我做错了什么?

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com