因为我不是在项目中使用ARC,在这里它不工作是我的代码
虽然下载和保存PDF
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *comicbook_id = [[NSUserDefaults standardUserDefaults]stringForKey:@"comicbook_id"];
NSString *filePath = [NSString stringWithFormat:@"%@/book_%@.pdf", documentsDirectory,comicbook_id];
虽然retreiving到我的读者我继续
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *comicbook_id = [[NSUserDefaults standardUserDefaults]stringForKey:@"comicbook_id"];
NSString *filePath = [documentsDirectory stringByAppendingPathComponent:[NSString stringWithFormat:@"book_%@.pdf",comicbook_id]];
NSLog(@"date==>%@",documentsDirectory);
NSString *phrase = nil;
ReaderDocument *document = [ReaderDocument withDocumentFilePath:filePath password:phrase];
NSLog(@"document==>%@",document);
if (document != nil) {
ReaderViewController *readerViewController = [[ReaderViewController alloc] initWithReaderDocument:document];
readerViewController.delegate = self;
readerViewController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
readerViewController.modalPresentationStyle = UIModalPresentationFullScreen;
[self presentViewController:readerViewController animated:YES completion:nil];
}