나는 vfr/reader을 사용하여 PDF 파일을 열 것입니다. 첫 번째 PDF 파일을 열면 내 앱이 올바르게 열리지 만 다른 파일을 열면 내 앱에서 첫 번째 파일을 다시 엽니 다. VFR Reader가있는 Xcode 다운로드 PDF 실수
이
는 PDF 파일을-(void)readIssue:(IssueMath *)issue {
NSString *filePath = [[issue.contentURL path] stringByAppendingPathComponent:@"Mathematics.pdf"];
NSLog(@"Read Path 1: %@ ",filePath);
ReaderDocument *document = [ReaderDocument withDocumentFilePath:filePath password:nil];
NSLog(@"Read Path 2: %@ ",document.fileURL);
ReaderViewController *readerViewController = [[ReaderViewController alloc] initWithReaderDocument:document];
readerViewController.delegate = self; // Set the ReaderViewController delegate to self
readerViewController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
readerViewController.modalPresentationStyle = UIModalPresentationFullScreen;
[self presentModalViewController:readerViewController animated:YES];
}
를 읽어 내 기능입니다 그리고 이것은 NSLog
출력 :
2012-11-02 20:09:31.081 MAGAZINE[314:15203] Read Path 1: /Users/eakmotion/Library/Application Support/iPhone Simulator/5.0/Applications/EC25BC08-E1E7-44B6-9AD8-0A321EEAC8B6/Library/Caches/ISSUE3_2011/Mathematics.pdf
2012-11-02 20:09:31.109 MAGAZINE[314:15203] Read Path 2: file://localhost/Users/eakmotion/Library/Application%20Support/iPhone%20Simulator/5.0/Applications/EC25BC08-E1E7-44B6-9AD8-0A321EEAC8B6/Library/Caches/ISSUE2_2011/Mathematics.pdf
ISSUE2_2011/Mathematics.pdf "
왜 filePath
이 여전히 동일한가요?
이 문제를 어떻게 해결할 수 있습니까?
2 개의 pdfs가 magazine.pdf라고해도이 문제는 발견되지 않습니다. 2 개의 pdfs는 다른 폴더에 있습니다. – Mickey
예 2 pdfs는 다른 폴더에 있지만 마지막으로 열린 PDF 파일과 Documents/Mathematics.plist에 저장된 페이지 번호 정보를 저장하는 파일이 있습니다.이 PDF 파일의/Library/Caches/plist 파일에도 pdf 파일이 있습니다 똑같을거야. –