0

how to create a connection between two webview, and also it should communicate. These both webview contains javascript. One thing more how to invoke javascript methods from ojective c(Xcode).

1 Answers1

2

use

- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType

to receive message from one webview use custom url scheme just like "command:cmd"

and

- (NSString *)stringByEvaluatingJavaScriptFromString:(NSString *)script;

to execute cmd in js format to send msg to another webview

adali
  • 5,977
  • 2
  • 33
  • 40