Using images and css file for a generated HTML UIWebView
- by Tom
Hi!
I'm generating an HTML file for an app, and in this HTML file there's a link to a stylesheet and one to an image.
Here's what I tried so far:
NSMutableString *toReturn = [NSMutableString stringWithCapacity:100];
NSString *cssPath = [[NSBundle mainBundle] pathForResource:@"etapes.css" ofType:nil];
[toReturn appendFormat:@"<html><head><title></title><link href=\"%@\" media=\"all\" rel=\"stylesheet\" type=\"text/css\" /></head><body>", cssPath];
It generates the right full path to the right file, this is okay if I want to access it on my mac, but on the simulator or my iPhone it doesn't point to the right place at all...
Do you have any idea of how could I make this?
Thanks