UIImage
-
The function to initialize the UIImage with gif image data.
Usage Example
let anImageData = try? Data(contentsOf: Bundle.main.url(forResource: "Clock", withExtension: "gif")!) let anImage :UIImage? = UIImage.animatedImage(gifData: anImageData!)
Declaration
Swift
public static func animatedImage(gifData pGifData:Data) -> UIImage?
-
The function to resize / rescale the UIImage.
Usage Example
let anImage :UIImage = UIImage(named: "DefaultAvatar")! let aResizedImage :UIImage? = anImage.resize(size: CGSize(width: 100.0, height: 200.0), scaleMode: UIImageScaleMode.aspectFit)
Declaration
Swift
public func resize(size pSize:CGSize, scaleMode pScaleMode: UIImageScaleMode) -> UIImage?