Fix the issue that SDAnimatedImageView can not render static image on iOS 14.
UIKit some internal behavior changes and we should always update the render layer if we have no `currentFrame`
This commit is contained in:
parent
5818cf70fd
commit
bb7b1914e6
|
@ -466,6 +466,9 @@
|
|||
- (void)displayLayer:(CALayer *)layer
|
||||
{
|
||||
UIImage *currentFrame = self.currentFrame;
|
||||
if (!currentFrame) {
|
||||
currentFrame = self.image;
|
||||
}
|
||||
if (currentFrame) {
|
||||
layer.contentsScale = currentFrame.scale;
|
||||
layer.contents = (__bridge id)currentFrame.CGImage;
|
||||
|
|
Loading…
Reference in New Issue