Ios from present view on the web view, and then dismiss will trigger which event will trigger.

67 0

On ios 's web view by clicking, triggers presentModalViewController:animated: Method pops up a new view controller and then the new view controller call dismissModalViewControllerAnimated: When you go back to web view, the event on which the web is triggered? Need to capture the status of this return.
I put onfocus on the body, no effect.
It may not be clear that there's a prerequisite: Don't call through native code

2 Answers

134 0

Change your mind.
When dismiss is notified of the viewcontroller of the web view to perform a function of js, you can manually notify the js execution of a method in web view.

NSString *jsCommand = [NSString stringWithString:@"alert('good luck')"];
[self.webView stringByEvaluatingJavaScriptFromString:jsCommand];
...