UIImage

public extension UIImage
  • Creates image from contents of local file

    • return: Returns nil if image can not be created or file can not be found.

    Declaration

    Swift

    @available(iOS 9.0, *)
    convenience init?(contentsOfFile file: URL)
  • Returns image with overlay image drawn the center on top.

    Declaration

    Swift

    func image(withOverlayImageAtCenter overlayImage: UIImage) -> UIImage
  • Returns image with overlay image drawn in the rect on top.

    Declaration

    Swift

    func image(withOverlayImage overlayImage: UIImage, inRect rect: CGRect) -> UIImage
  • Resizes specified image to required size. It uses aspect fill approach and high interpolation quality.

    Declaration

    Swift

    func image(withSize size: CGSize) -> UIImage

    Parameters

    size

    Required size.

    Return Value

    Resized image.

  • Returns screen scaled image. Assuming source image is for 2208x1242 screen.

    Declaration

    Swift

    var screenFitImage: UIImage { get }