UIImage

public extension UIImage

A HyperwalletUI extension to UIImage.

  • Get an icon image with the given icon name, text color, size and background color

    Declaration

    Swift

    static func fontIcon(_ name: String,
                         _ iconSize: CGSize,
                         _ fontSize: CGFloat,
                         _ textColor: UIColor) -> UIImage

    Parameters

    name

    The preferred HyperwalletIconContent.

    iconSize

    The image size

    fontSize

    The font size of the icon

    textColor

    The text color (optional).

    Return Value

    A string that will appear as icon

  • Create Background Pattern

    Declaration

    Swift

    static func createBackgroundPattern(color: UIColor, size: CGSize, cornerRadius: Int) -> UIImage

    Parameters

    color

    UIColor

    size

    CGSize

    cornerRadius

    Int

    Return Value

    UIImage

  • Get an icon image with the given icon name, text color, size and background color

    Declaration

    Swift

    static func fontIcon(_ name: String,
                         _ iconSize: CGSize,
                         _ fontSize: CGFloat,
                         _ textColor: UIColor) -> UIImage

    Parameters

    name

    The preferred HyperwalletIconContent.

    iconSize

    The image size

    fontSize

    The font size of the icon

    textColor

    The text color (optional).

    Return Value

    A string that will appear as icon

  • Create Background Pattern

    Declaration

    Swift

    static func createBackgroundPattern(color: UIColor, size: CGSize, cornerRadius: Int) -> UIImage

    Parameters

    color

    UIColor

    size

    CGSize

    cornerRadius

    Int

    Return Value

    UIImage