I need to modify dynamically a Javascript inside my UIWebView. I load a file html locally, inside the Documents folder of my app.
I need to create a var attributes like this:
var attributes = {
"feedURL": "http://www.obliviux.com/?feed=rss2", //insert NSString *RSS here
"maxAgeToShow": "-1", //insert NSString *maxAge here
"numItemsToShow": "10", //insert NSString *numItems here
"topStories": "3" //insert NSString *topStories here
};
And modify their value with some NSString I have saved..
How can i do this?
First of all, you can load your html-data from a plain NSData-object. Keeping that in mind, you can load a NSString from your file, replacing ‘__feed_url__’ (for example) with your NSString.
Besides that, you could consider this:
As you can see, this way is far more complicated.