FlaneurImageView
final public class FlaneurImageView: UIImageView
A utility wrapping UIImageView
so that we can set images from descriptors and cancel asynchronous operations
when relevant and necessary.
Since an extension wouldn’t allow to store information, subclassing UIImageView
was necessary.
-
Specifies if Photos Assets should be fetched as thumbnails or not.
Declaration
Swift
public var assetThumbnailMode: Bool = false
-
Sets the image using an image descriptor.
Declaration
Swift
public func setImage(with imageDescription: FlaneurImageDescriptor)
Parameters
imageDescription
the descriptor of the image being used.
-
Prepares the instance to be reused.
Since some asynchronous operations might be in progress, you should call this method to cancel them before reusing the instance. For instance, if the instance has a
UITableViewCell
parent view, calling this method is necessary to avoid races between operations.Declaration
Swift
public func prepareForReuse()