views:

967

answers:

2

UIWebView is fine for displaying HTML, but I'd like to modify the loaded DOM from my Objective-C program. Does anybody know how to do that? This is a third party page, so I can't really include any custom JS to do so...unless I can modify the DOM somehow.

+1  A: 

This may be of some help, as not to plagiarize the solution provider in the link, here's the link: http://lists.apple.com/archives/safari-iphone-web-dev/2008/Sep/msg00001.html

curtisk
I saw that method after asking the question. It'll be tedious, but I support it should be able to do most of what I need that way. Thanks!
Robert Sanders
+1  A: 

Some more related techniques around Obj-C / JS communication:

Using UIWebView for local resources:

http://dominiek.com/articles/2008/7/19/iphone-app-development-for-web-hackers

Google Maps API for iPhone:

http://code.google.com/p/iphone-google-maps-component/

Bidirectional calling between Obj-C and Javascript:

http://tetontech.wordpress.com/2008/08/14/calling-objective-c-from-javascript-in-an-iphone-uiwebview/

Robert Sanders