0
我是新的iPhone/i Pad開發和我有問題。如何在ipad下載pdf文件。 我有pdf的URL,我需要下載它。並離線使用它.. 任何人都可以幫助我解決這個問題。如何下載PDF文件並將其保存在ipad BD通過XML解析
事先日Thnx ..
我是新的iPhone/i Pad開發和我有問題。如何在ipad下載pdf文件。 我有pdf的URL,我需要下載它。並離線使用它.. 任何人都可以幫助我解決這個問題。如何下載PDF文件並將其保存在ipad BD通過XML解析
事先日Thnx ..
NSData *yourPDFFileData = [[NSData alloc] initWithContentsOfURL:[NSURL URLWithString:yourPDFURL]];
//Store the Data locally as PDF File
NSString *docPath = [[NSString alloc] initWithString:[[[[NSBundle mainBundle] resourcePath] stringByDeletingLastPathComponent] stringByAppendingPathComponent:@"PDFFiles"]];
NSString *yourFilePath = [docPath stringByAppendingPathComponent:@"yourPDFName.pdf"];
[yourPDFFileData writeToFile:yourFilePath atomically:YES];
這將節省從網址到本地的iPhone/iPad上的文件。希望能幫助到你。
謝謝你有很多.. –
@穆罕默德這是否解決了你的問題?如果是,請將此標記爲已接受,以便在存在同樣問題的情況下對其他人有所幫助。 –