tags:

views:

47

answers:

0

I have an iPad UIWebView which has to display some rtfd.zip files. I try to do it like this:

-(void) viewWillAppear:(BOOL)animated {

[self loadFile:string];
}
- (void)loadFile:(NSString*)file
{
NSString* resourcePath = [[NSBundle mainBundle] bundlePath];
NSString* sourceFilePath = [resourcePath stringByAppendingPathComponent:file];
NSURL* url = [NSURL fileURLWithPath:sourceFilePath isDirectory:NO];
NSURLRequest* request = [NSURLRequest requestWithURL:url];
[webview loadRequest:request];
[resourcePath release];
}

But I only get a blank page. The outlets are definitely connected properly - the UIWebView can load google main page.

What am I doing wrong? Thanks in advance!