Skip to content

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

@bhadreshtechinnate

Description

@bhadreshtechinnate

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions