私は考えることができるすべてを試しましたが、それはまだNOに反応し、Appleには何のヒントもありません。UIDocumentInteractionController presentPreviewAnimated:NOを返すとプレビューが表示されない
- (void)connectionDidFinishLoading:(NSURLConnection *)connection
{
NSLog(@"finished!");
NSString *tempString = [NSString stringWithFormat:@"file://%@%@", NSTemporaryDirectory(), [[NSProcessInfo processInfo] globallyUniqueString]];
NSURL *tempURL = [NSURL URLWithString:tempString];
[receivedData writeToURL:tempURL atomically:YES];
NSLog(@"tempURL is written!");
UIDocumentInteractionController *interactionController = [UIDocumentInteractionController interactionControllerWithURL:tempURL];
interactionController.delegate = self;
[interactionController retain];
NSLog(@"--- %i", [interactionController presentPreviewAnimated:YES]);
NSLog(@"presented preview");
[connection release];
[receivedData release];
}
- (UIViewController*)documentInteractionControllerViewControllerForPreview:(UIDocumentInteractionController *)controller
{
NSLog(@"asdf");
UIViewController *viewController = [[[UIViewController alloc] init] autorelease];
[self.navigationController pushViewController:viewController animated:YES];
return viewController;
}
tempUrlがnullでないかどうかを確認しましたか? – Adriana