Th 문제는 "success"가 항상 false를 반환한다는 것입니다. 나는 문제가 무엇이 아닌가?UIDocumentInteractionController는 Ibook에서 문서를 열지 못합니다.
내 코드를 다음과 같이
UIDocumentInteractionController *docController = [[UIDocumentInteractionController interactionControllerWithURL:currentPDFPath] retain];
if (docController)
{
docController.delegate = self;
BOOL success = [docController presentOptionsMenuFromBarButtonItem:openInButton animated:YES];
//BOOL success = [docController presentOpenInMenuFromBarButtonItem:openInButton animated:YES];
NSLog(@"success: %d", success);
if(!success)
{
UIAlertView * noApps = [[UIAlertView alloc] initWithTitle:@"Error" message:@"Your iPad doesn't seem to have any other Apps installed that can open this document (such as iBooks)" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
[noApps show];
[noApps release];
}
}
[docController release];
currentPDFPath에는 무엇이 들어 있습니까? –
파일 : //localhost/var/mobile/Applications/14DD059B-9969-4960-8E24-DC586A4302D1/Library/Caches/http-__wgsn.howoco.com_media_event_117_AW12_13_Tradeshow_seasonal_analysis_-_colour_1340296472.pdf%3F1340297029 –
@PriyankaChhetri는 u는 이것에 대한 해결책을 찾았나요 , 알려 주시기 바랍니다, 감사합니다 :) –