Skip to content

Instantly share code, notes, and snippets.

@TiernanKennedy
Created January 18, 2013 19:31
Show Gist options
  • Save TiernanKennedy/4567616 to your computer and use it in GitHub Desktop.
Save TiernanKennedy/4567616 to your computer and use it in GitHub Desktop.
Opening a file in a UIWebView
-(void)loadDocument:(NSString*)documentName inView:(UIWebView*)webView
{
NSString *path = [[NSBundle mainBundle] pathForResource:documentName ofType:nil];
NSURL *url = [NSURL fileURLWithPath:path];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[webView loadRequest:request];
}
[self loadDocument:@"iPhoneLibrary.key" inView:self.webView];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment