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!

©2010 iPhone, iOS 4, iPad SDK Development Tutorial and Programming Tips. All Rights Reserved.

.

Share and Enjoy:

RSS
Twitter
Facebook
DZone
HackerNews
del.icio.us
FriendFeed

Leave a Reply

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