Hi, maybe a little back, but I hope this helps.
I just used the notification when it introduces the webViewDidFinishLoad method so that I can capture one instance of the method and then I will detect the notification and do my logic from there.
hope this helps. it does not capture the last invoked instance of the webViewDidFinishLoad method, but allows you to do something when it was called, rather than repeating calls to that particular method (for example, showing a button) too.
********* EDIT *********
I did a test and was able to test it. it really works, and the method called from the notification will be called after loading the full page.
Alternatively, I think you can do the counter using the delegation method webViewDidStartLoad, as well as the webViewDidFinishLoad, to make sure they are the same before you run your codes. this, however, is an ugly hack since we will never know how many times it will be called unless I load the html feed and you can add JavaScript to check how many elements there are on the page you are loading. I just use some of the methods that I was trying to solve. hope this helps.
Feedback is welcome. thank!
faterpig May 09 '12 at 4:05 a.m. 2012-05-09 04:05
source share