UIImageView

public extension UIImageView
  • Sets de image of the view to a drawing of the given string, it’s recomended for using emojis as images, but it can be used with any string.

    Declaration

    Swift

    func draw(string: String, fontSize: CGFloat = 50)

    Parameters

    string

    String, the text to draw in the image.

    fontSize

    CGFloat, size of the font to use on the represented string, if fontSize is not specified it will be set to 50.

  • Sets de image of the view to a drawing of the given string, it’s recomended for using emojis as images, but it can be used with any string.

    Declaration

    Swift

    func draw(string: String, font: UIFont)

    Parameters

    string

    String, the text to draw in the image.

    font

    UIFont to apply to the drawn string.