Skip to content

determining if image was loaded from cache #15

@rjuzaszek

Description

@rjuzaszek

Hello, great work, really appreciate simplicity of this lib, but I found myself in a situation when I would like to determine if image was really downloaded or loaded from a cache - for example to show or not to show an animation, is there a simple way to determine that (maybe using duration field in MoaImage)?

desired example:

profileImage.moa.onSuccessAsync = {  image in
    if !image.loadedFromCache {
        UIView.animate(withDuration: 0.3, animations: {
            self.profileImage.layer.opacity = 1.0
        })
    }
   return image
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions