Get Updates By E-mail 

Article Written By:
Johann Dowa

Open Source UIWebView Library Adding Response Handling, User Agent Setting And More

  •  
  •  
  •  
  •  
  •  

In the past I’ve mentioned some UIWebView alternatives most recently TOWebViewController and DZWebBrowser.

Here’s a library providing a UIWebView subclass adding a number of nice features called OTMWebView from Otium.

OTMWebView adds features for response handling, progress tracking, detecting title changes, and the setting of user agents to the web view.

Here’s a code snippet from the readme showing how to use the response handling capability:

-(void)webView:(OTMWebView *)webView didReceiveResponse:(NSURLResponse *)response forRequest:(NSURLRequest *)request {

<pre><code>if ([response.MIMEType isEqualToString:@"video/mp4"]) {

    [webView stopLoading];
    // Do something else...
}
</code></pre>

}

You can find OTMWebView on Github here.

A nice UIWebView enhancement.


  •  
  •  
  •  
  •  
  •  

Submit A Resource

Have you created a useful tutorial, library or tool for iOS development that you would like to get in front of our 300,000+ monthly page views from iOS developers?

You can submit the url here.

The resources we feel will appeal to our readers the most will be posted on the front page.

Comments