iOS5 용으로 제작 된 iMax 용 애플리케이션이 iOS5 용으로 제작되었으며 iOS6에서는 더 이상 작동하지 않습니다. canOpenURL
이 true를 반환하고 코드가 실행됩니다. 이미지는 응용 프로그램의 문서 폴더에 .igo
확장자로 저장됩니다. 이것은 com.instagram.exclusivegram으로 Instagram에 전달됩니다.UIDocumentInteractionController가 iOS6에서 더 이상 작동하지 않습니다
아래 코드는 if 문을 입력하고 "here in"을 표시하지만 화면 맨 아래에서와 같이 공유 대화 상자를 열지 않습니다.
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");
}
_imgToUpload
도 올바른 파일 경로를 제공합니다.
감사합니다. 나는 이것을 알아 냈으므로 게시하는 것을 잊었습니다! 좋은 발견 –
감사합니다. 그러나 "Open In"액션 시트가 없어도 Instagram에 직접 갈 수있는 방법이 있습니까? – GeneCode