You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- (void)displayLayer:(CALayer *)layer {
if (_curFrame) {
layer.contents = (__bridge id)_curFrame.CGImage;
} else {
// If we have no animation frames, call super implementation. iOS 14+ UIImageView use this delegate method for rendering.
if ([UIImageView instancesRespondToSelector:@selector(displayLayer:)]) {
[super displayLayer:layer];
}
}
}
Activity
MyHZ commentedon Jul 8, 2020
YYAnimatedImageView.m
UIImage *currentFrame = _curFrame;
if (!currentFrame) {
currentFrame = self.image;
}
if (currentFrame) {
layer.contentsScale = currentFrame.scale;
layer.contents = (__bridge id)currentFrame.CGImage;
}
}
mars2639 commentedon Jul 31, 2020
YYAnimatedImageView.m
cityleaf commentedon Sep 18, 2020
我们没有改ibireme的源码,因为日后他可能会要升级,我是用类别hook了那个方法:displayLayer:
QiuYeHong90 commentedon Sep 18, 2020
pod 'YYImage', :git => 'https://github.com/QiuYeHong90/YYImage.git'
临时解决
CodeSlaveZhang commentedon Sep 19, 2020
[super displayLayer:layer];
if (_curFrame) {
layer.contents = (__bridge id)_curFrame.CGImage;
}
}
paulAndKey commentedon Sep 25, 2020
哦豁,已解决
aixl commentedon Oct 27, 2020
貌似还有偶现的不显示问题