From 658eca4d822b4ce3be54f8eb7a00eeed09378da9 Mon Sep 17 00:00:00 2001 From: Jiawei Wang Date: Mon, 14 Mar 2016 21:09:29 +0800 Subject: [PATCH] Update README.md --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d9abd9a..523b760 100644 --- a/README.md +++ b/README.md @@ -28,10 +28,12 @@ github "wangjwchn/JWAnimatedImage" ```swift let url = NSBundle.mainBundle().URLForResource(“imagename”, withExtension: "gif")! let imageData = NSData(contentsOfURL:url) -let imageView = JWAnimatedImageView() -imageView.addGifImage(imageData!) -imageView.frame = CGRect(x: 0.0, y: 30.0, width: 300.0, height: 200.0) -view.addSubview(imageView) +let image = UIImage() +image.AddGifFromData(imageData!) +let imageview = UIImageView() +imageview.AddGifImage(image) +imageview.frame = CGRect(x: 7.0, y: 50.0, width: 400.0, height: 224.0) +view.addSubview(imageview) ``` ##Benchmark: ####Compare with [FLAnimatedImage](https://github.com/Flipboard/FLAnimatedImage) and [SwiftGif](https://github.com/bahlo/SwiftGif)