UIImage

extension UIImage
  • Create a flat color image

    Declaration

    Swift

    static func image(color: UIColor, size: CGSize) -> UIImage?

    Parameters

    color

    UIColor

    size

    CGSize

    Return Value

    Image if created

  • Return a rounded copy

    Declaration

    Swift

    func rounded(cornerRadius: Int) -> UIImage?

    Parameters

    cornerRadius

    Point radius

    Return Value

    Image if created