1
whatsapp를 통해 이미지를 공유하고 싶습니다. 다음 코드로 UIDocumentInteractionController를 사용하고 있습니다. 열린 메뉴 (사용자가 whatsapp를 선택)를 건너 뛰고 첫 번째 옵션을 선택한 것처럼 행동 할 수 있습니까?UIDocumentInteractionController의 presentOpenInMenuFromRect 건너 뛰기
if ([[UIApplication sharedApplication] canOpenURL: [NSURL URLWithString:@"whatsapp://app"]])
{
NSString *savePath = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/whatsAppTmp.wai"];
[UIImageJPEGRepresentation(image, 1.0) writeToFile:savePath atomically:YES];
_documentInteractionController = [UIDocumentInteractionController interactionControllerWithURL:[NSURL fileURLWithPath:savePath]];
_documentInteractionController.UTI = @"net.whatsapp.image";
_documentInteractionController.delegate = self;
[_documentInteractionController presentOpenInMenuFromRect:CGRectZero inView:self.view animated: YES];
}