UIImage

class UIImage : NSObject, NSSecureCoding
  • Create an image with a solid color.

    Declaration

    Swift

    public class func createWithColor(color: UIColor, size: CGSize) -> UIImage

    Parameters

    color

    The color to use when creating the image.

    size

    The size of image to create.

    Return Value

    A UIImage filled with the specified color and whose dimensions equal the give size