問題是,「成功」總是讓我錯誤?我不是什麼問題?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沒有ü找到一個解決方案,請讓我知道,謝謝:) –