title: Calling Objective C function from UIWebView using Ajax
body: <p>I found online a tutorial where it says that ObjectiveC code can be called from a WebView using the following Javascript code</p>
  
  <pre><code>var iframe = document.createElement("IFRAME");
  iframe.setAttribute("src", "js-frame:myObjectiveCFunction");
  document.documentElement.appendChild(iframe);
  iframe.parentNode.removeChild(iframe);
  iframe = null;
  </code></pre>
  
  <p>Then from ObjectiveC I must implement UIWebViewDelegate to receive the     shouldStartLoadWithRequest. 
  I tried this code and it worked; however, I was wondering if the same functionality could be implemented using an AJAX call instead of using an IFrame. </p>