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
This problem occurs when loading a single-frame GIF, the rest is unclear...
didMoveToWindow will be triggered when we switch viewControllers,
but self.layer.contents may be nil, causing the FLAnimatedImageView to display blank.
I have solved it through hook -didMoveToWindow temporarily. I hope the official can provide the correct solution as soon as possible, please...
- (void)xxxx_didMoveToWindow
{
[self xxxx_didMoveToWindow];
if (self.window && self.image && ([self.image sd_imageFormat] == SDImageFormatGIF) && self.animatedImage && self.animatedImage.frameCount == 1 && !self.layer.contents) {
/// Single-frame GIF, which is not displayed when we switch viewControllers, needs to call setNeedsDisplay again to trigger the -displayLayer
[self.layer setNeedsDisplay];
}
}
@raphaelschaad Is there anyone who can solve this problem, or at least pay attention.
My solution can be used, but not including some special cases, such as using UIPopoverPresentationController, still can cause it to become nil, I can't figure out the reason...)
@zisulu
maybe is Apple bugs system api in -[UIImageView _setImageViewContents:] () will set layer.contents into nil
you can add this code to refresh with displayLink callback
This problem occurs when loading a single-frame GIF, the rest is unclear...
but self.layer.contents may be nil, causing the FLAnimatedImageView to display blank.
I have solved it through hook -didMoveToWindow temporarily. I hope the official can provide the correct solution as soon as possible, please...
single_frame_test.gif.zip
Sorry for my English...
The text was updated successfully, but these errors were encountered: