/SDWebViewImageCache

SDWebViewImageCache is used to share image resourece in native SDImageCache with UIWebView, which is based on SDWebImage.

Primary LanguageObjective-CMIT LicenseMIT

SDWebViewImageCache

CI Status Version License Platform

SDWebViewImageCache is used to share image resourece in native SDImageCache with UIWebView, which is based on SDWebImage.

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

  • SDWebImage
  • UIWebview

Installation

SDWebViewImageCache is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'SDWebViewImageCache'

Usage

Register the SDWebViewImageCache, when app launch.

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    [NSURLProtocol registerClass:[SDWebViewCacheProtocol class]];
    return YES;
}

Demo

For the same Image in iamgeview and webview, just download one time.

License

SDWebViewImageCache is available under the MIT license. See the LICENSE file for more info.