Saturday, December 19, 2009
Wednesday, December 09, 2009
Loading local web resources on iPhone
I wanted to learn how to load web resources locally, so I finally found how:
Also, you have to make your javascript resources non-executable
NSString *path = [[NSBundle mainBundle] pathForResource: "test.html" ofType: @""];Objective-C is pretty convoluted sometimes!
[self.webView loadRequest: [NSURLRequest requestWithURL: [NSURL fileURLWithPath: path]]];
Also, you have to make your javascript resources non-executable