Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collectionview cell flicker issue when runImageTransitionIfCached = true with imagetransition is "noTransition" #479

Open
bhadreshtechinnate opened this issue Aug 28, 2024 · 0 comments

Comments

@bhadreshtechinnate
Copy link

bhadreshtechinnate commented Aug 28, 2024

Alamofire Environment

Alamofire version:
5.9.1
AlamofireImage version:
4.3.0
Xcode version:
15.4
Swift version:
5
macOS version running Xcode:
Sonoma 14.2.1

Here is the code, I am using to set the image from url:

extension UIImageView {
    
    public func sc_setImage(withURL url: URL, placeholder: UIImage?=nil, filter: ImageFilter?=nil, imageTransition: ImageTransition? = .noTransition,completionHandler:((UIImage?)-> Swift.Void)?=nil) {
       // print("sc_setImage url=", url.absoluteString)
         af.setImage(withURL: url,placeholderImage:placeholder,filter:filter,
                    imageTransition:imageTransition!,runImageTransitionIfCached:true,completion:{ image in
                        completionHandler?(image.value)
            })
    }
}

When I set the image transition = .noTransition and runImageTransitionIfCached = true, at that time collectionview cell start flickering when scroll fast or switching from screen A to screen B and again come to screen A.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant