CodeHelper

public final class CodeHelper

Generate code images

Author

Adamas

Date

15/09/2019

Version

1.5.0
  • Create a code image.

    Important

    On iOS 14, the generated image cannot be applied to an UIImageView within a UIScrollView, whose contentMode is .scaleAspectFit or .scaleAspectFill.

    Declaration

    Swift

    public func createCode(_ code: String,
                           as type: CodeType,
                           with size: CGSize) -> UIImage?

    Parameters

    code

    The code.

    type

    The code type.

    size

    The code size.

  • The initializor

    Declaration

    Swift

    public init()