Проблема в том, что «успех» всегда возвращает мне 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];
В чем состоит текущийPDFPath? –
файл: //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 ли у найти решение для этого , пожалуйста, дайте мне знать, спасибо :) –