I'm trying to fully render a PDF in an iPad webview but the document displays too small and not the full size as to what it should be. The PDF renders perfectly on the iPhone just not the iPad webview. Please let me know if you need more information.
Main View
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
//NSString *url = [chapterFiles objectAtIndex:indexPath.row];
NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle]pathForResource: [chapterFiles objectAtIndex:indexPath.row] ofType:@"pdf"]];
NSLog(@"Selected File: %@",url);
//transfer selected
UIStoryboard *sb = [UIStoryboard storyboardWithName:@"Main_iPhone" bundle:nil];
chapterDetailViewController *detailView = (chapterDetailViewController *)[sb instantiateViewControllerWithIdentifier:@"chapterDetails"];
detailView.url = url;
[self.navigationController pushViewController:detailView animated:YES];
}
Detail View:
//NSString *path = [[NSBundle mainBundle] pathForResource:url ofType:@"pdf"];
//NSURL *targetURL = [NSURL fileURLWithPath:url];
NSURLRequest *siteRequest = [NSURLRequest requestWithURL:url];
[chapterWebView loadRequest:siteRequest];
chapterWebView.delegate = self;
//[chapterWebView setScalesPageToFit:YES];
chapterWebView.scalesPageToFit = YES;
// chapterWebView.contentMode = UIViewContentModeScaleToFill;
// chapterWebView.multipleTouchEnabled = YES;
// chapterWebView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
// [self.view addSubview:chapterWebView];
}
UIWebViewdoes it fill the whole screen? I assume it doesn't. - nhgrif