Tutorial: How To Substitute Remote UIWebView Requests With Cached Data

There are times when you may want to load a web page, but usually for interfacing purposes will want to substitute remote requests with local data.  This is can be a great time saver as rather than create an entire interface within your app you can load up a webpage then insert your customized iOS components.

Matt Gallagher has created a tutorial illustrating how to intercept remote requests by overloading the cachedResponseForRequest: method and redirecting specific requests to the local cache.  Some sample code is included, and Matt gets into some of the specifics on the NSUrlCache and setting the cache within your app as the shared cache.

The full tutorial and sample code can be found here:
Substituting Local Data For Remote Requests

Thanks for reading, please share this using the buttons below!

Keynotopia is the largest collection of user interface design templates so you can build professional active iPhone and iPad app prototypes quickly using Keynote. No programming knowledge required.
Read more...
DeliciousTwitterFacebookLinkedInEmail

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 send a Tweet to @maniacdev on Twitter or submit the url here.

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

Click on a tab to select how you'd like to leave your comment

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>