So I have a class here that downloads a file from a webpage, and then I use loadHTMLString and set the baseurl to main bundle path where my custom css file is.
This works swell for the specific page I want to display with that class, but then I run into another problem.
I have a page with a form used to post a message to a specific forum, but they've disabled off-site posting, so I can't use loadHTMLString (even if I set the baseurl to the host of the page), so the only way for some of the elements on the page to work and the posting itself I need to use loadRequest.
But when using loadRequest I'm not able to specify a custom css file, so how would I solve this?
So far I've been able to think up 3 ways of doing this, but I can't seem to figure out how to do any of them, or even if any of them are possible.
1. Specifying a custom CSS file for my UIWebView
2. Editing the received data before UIWebView starts parsing it and change it so that the line where it specifies the css file will point to my custom css file (much like I do now when I use loadHTMLString)
3. Intercept requests for the default css file that the page uses and redirect that request to my custom css file
Are any of these doable? If so, how?
This works swell for the specific page I want to display with that class, but then I run into another problem.
I have a page with a form used to post a message to a specific forum, but they've disabled off-site posting, so I can't use loadHTMLString (even if I set the baseurl to the host of the page), so the only way for some of the elements on the page to work and the posting itself I need to use loadRequest.
But when using loadRequest I'm not able to specify a custom css file, so how would I solve this?
So far I've been able to think up 3 ways of doing this, but I can't seem to figure out how to do any of them, or even if any of them are possible.
1. Specifying a custom CSS file for my UIWebView
2. Editing the received data before UIWebView starts parsing it and change it so that the line where it specifies the css file will point to my custom css file (much like I do now when I use loadHTMLString)
3. Intercept requests for the default css file that the page uses and redirect that request to my custom css file
Are any of these doable? If so, how?