ios - Capturing information from a UIWebView -
I have a UIWebView
in my app that parses HTML from a server and it My challenge is that this is a checklist in HTML, and I would like to occupy the time the user checks and unchecks the next time I load the same HTML.
Anyway click on the checkbox to capture?
How can this be done?
The JavaScript will be used with the help of several steps.
- Add the listener to the document for the event '
CheckboxStat Change
. - The target ID of the event is the check ID of the checkbox that you want if you capture the value in a JS variable.
- Now load the iframe with a specific URL prefix
myevent: // checkbox? Id: value
- If your IFrame is full then your web view will trigger
shouldStartLoadWithRequest
method You can check the URL scheme from the requested object. If it is "myevent" then you can parse the URL string to store the appropriate value. - The next time the page loads, you can set the values by javascript with that value injected.
Comments
Post a Comment