Update the comments and demo for macOS
This commit is contained in:
parent
5da5ec92fb
commit
915278bfd8
|
@ -63,7 +63,7 @@
|
|||
@"http://www.httpwatch.com/httpgallery/authentication/authenticatedimage/default.aspx?0.35786508303135633", // requires HTTP auth, used to demo the NTLM auth
|
||||
@"http://assets.sbnation.com/assets/2512203/dogflops.gif",
|
||||
@"https://raw.githubusercontent.com/liyong03/YLGIFImage/master/YLGIFImageDemo/YLGIFImageDemo/joy.gif",
|
||||
@"https://raw.githubusercontent.com/onevcat/APNGKit/master/TestImages/APNG-cube.apng",
|
||||
@"http://apng.onevcat.com/assets/elephant.png",
|
||||
@"http://www.ioncannon.net/wp-content/uploads/2011/06/test2.webp",
|
||||
@"http://www.ioncannon.net/wp-content/uploads/2011/06/test9.webp",
|
||||
@"http://littlesvr.ca/apng/images/SteamEngine.webp",
|
||||
|
|
|
@ -28,11 +28,12 @@
|
|||
[super viewDidLoad];
|
||||
|
||||
// For animated GIF rendering, set `animates` to YES or will only show the first frame
|
||||
self.imageView2.animates = YES; // `SDAnimatedImageRep` be can used for built-in `NSImageView` to support better GIF & APNG rendering
|
||||
self.imageView3.animates = YES;
|
||||
self.imageView4.animates = YES;
|
||||
self.imageView1.sd_imageIndicator = SDWebImageProgressIndicator.defaultIndicator;
|
||||
[self.imageView1 sd_setImageWithURL:[NSURL URLWithString:@"http://s3.amazonaws.com/fast-image-cache/demo-images/FICDDemoImage001.jpg"]];
|
||||
[self.imageView2 sd_setImageWithURL:[NSURL URLWithString:@"http://www.ioncannon.net/wp-content/uploads/2011/06/test2.webp"]];
|
||||
[self.imageView2 sd_setImageWithURL:[NSURL URLWithString:@"https:raw.githubusercontent.com/onevcat/APNGKit/master/TestImages/APNG-cube.apng"]];
|
||||
[self.imageView3 sd_setImageWithURL:[NSURL URLWithString:@"https://raw.githubusercontent.com/liyong03/YLGIFImage/master/YLGIFImageDemo/YLGIFImageDemo/joy.gif"]];
|
||||
self.imageView4.wantsLayer = YES;
|
||||
self.imageView4.sd_imageTransition = SDWebImageTransition.fadeTransition;
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
|
||||
// A subclass of `NSBitmapImageRep` to fix that GIF loop count issue because `NSBitmapImageRep` will reset `NSImageCurrentFrameDuration` by using `kCGImagePropertyGIFDelayTime` but not `kCGImagePropertyGIFUnclampedDelayTime`.
|
||||
// Built in GIF coder use this instead of `NSBitmapImageRep` for better GIF rendering. If you do not want this, only enable `SDWebImageImageIOCoder`, which just call `NSImage` API and actually use `NSBitmapImageRep` for GIF image.
|
||||
// This also support APNG format using `SDWebImageAPNGCoder`. Which provide full alpha-channel support and the correct duration match the `kCGImagePropertyAPNGUnclampedDelayTime`.
|
||||
|
||||
@interface SDAnimatedImageRep : NSBitmapImageRep
|
||||
|
||||
|
|
Loading…
Reference in New Issue