To run the example project, clone the repo, and run pod install
from the Example directory first.
- iOS 8+
SDWebImageSVGCoder is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'SDWebImageSVGCoder'
To use SVG coder, you should firstly add the SDImageSVGCoder
to the coders manager. Then you can call the View Category method to start load SVG images.
- Objective-C
SDImageSVGCoder *SVGCoder = [SDImageSVGCoder sharedCoder];
[[SDImageCodersManager sharedManager] addCoder:SVGCoder];
UIImageView *imageView;
[imageView sd_setImageWithURL:url];
- Swift
let SVGCoder = SDImageSVGCoder.shared
SDImageCodersManager.shared.addCoder(SVGCoder)
let imageView: UIImageView
imageView.sd_setImage(with: url)
DreamPiggy
SDWebImageSVGCoder is available under the MIT license. See the LICENSE file for more info.