Is it possible to listen for a notification posted by Javascript in a UIWebView? Or similar? I have thought about repeating a function in Objective-C that monitors a JS variable but surely there is a better way?
I want to listen for when a particular image loads in the UIWebView (which I can do with .load method in jQuery), when the image does load I would like to hide a native UIActivityIndicator. I don't want to use a gif in the web view!
i.e.
$('img.someImage').load(function(){
//fire something for obj-c to listen to!
});