1
可能重複:
UIDocumentInteractionController no longer works in iOS6的iOS發佈到Instagram的工作不
我無法從我的應用程序打開的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應用程序。我究竟做錯了什麼?
找到解決方案!請參閱http://stackoverflow.com/questions/12631466/uidocumentinteractioncontroller-no-longer-works-in-ios6。 – Macondo2Seattle
發佈您的搜索作爲答案,然後接受它 – esqew