I have create an IOS app.
The app has MainViewController that will present/dismiss Modal view from webViewController nib file(contains NavBar and UIWebView). I want to inject my javascript functions in every web pages that loaded by the UIWebView and those functions will be call in webpages that means all functions had to finish load before pages finish load.
I try many ways but it seem like when the ModalView present again(it's work fine at first present).The page doesn't know my injected function.
So my question is:
- Where should i inject my javascript if the UIWebView load request when the ModalView present? Before loadRequest? didStartLoad? didFinishLoad?
- What should i do with UIWebView when dismiss the ModalView? load the about:blank request?
Thanks for reading and any help/suggestion. :)