McdCardDataImages

Objective-C

@interface McdCardDataImages : NSObject

Swift

class McdCardDataImages : NSObject

Provides API for interacting with received card data.

  • Returns UIImage with PAN.

    Declaration

    Objective-C

    - (nonnull UIImage *)getPanImage:(UIFont *_Nonnull)font
                               color:(UIColor *_Nonnull)color
                             spacing:(CGFloat)spacing;

    Swift

    func getPanImage(_ font: UIFont, color: UIColor, spacing: CGFloat) -> UIImage

    Parameters

    font

    The font of the text.

    color

    The color of the text.

    spacing

    Character spacing.

    Return Value

    Returns UIImage with PAN.

  • Returns UIImage with part of a PAN.

    Declaration

    Objective-C

    - (nonnull UIImage *)getPanImage:(UIFont *_Nonnull)font
                               color:(UIColor *_Nonnull)color
                             spacing:(CGFloat)spacing
                          startDigit:(NSUInteger)startDigit
                              length:(NSUInteger)length;

    Swift

    func getPanImage(_ font: UIFont, color: UIColor, spacing: CGFloat, startDigit: UInt, length: UInt) -> UIImage

    Parameters

    font

    The font of the text.

    color

    The color of the text.

    spacing

    Character spacing.

    startDigit

    The beginning index.

    length

    Length of the substring.

    Return Value

    Returns UIImage with PAN.

  • Returns UIImage with expiry date in MM/YY format.

    Declaration

    Objective-C

    - (nonnull UIImage *)getExpiryImage:(UIFont *_Nonnull)font
                                  color:(UIColor *_Nonnull)color
                                spacing:(CGFloat)spacing;

    Swift

    func getExpiryImage(_ font: UIFont, color: UIColor, spacing: CGFloat) -> UIImage

    Parameters

    font

    The font of the text.

    color

    The color of the text.

    spacing

    Character spacing.

    Return Value

    UIImage with expiry date in MM/YY format.

  • Returns UIImage image with emboss name.

    Declaration

    Objective-C

    - (nonnull UIImage *)getEmbossNameImage:(UIFont *_Nonnull)font
                                      color:(UIColor *_Nonnull)color
                                    spacing:(CGFloat)spacing;

    Swift

    func getEmbossNameImage(_ font: UIFont, color: UIColor, spacing: CGFloat) -> UIImage

    Parameters

    font

    The font of the text.

    color

    The color of the text.

    spacing

    Character spacing.

    Return Value

    UIImage image with emboss name.

  • Returns UIImage image with CVV.

    Declaration

    Objective-C

    - (nonnull UIImage *)getCvvImage:(UIFont *_Nonnull)font
                               color:(UIColor *_Nonnull)color
                             spacing:(CGFloat)spacing;

    Swift

    func getCvvImage(_ font: UIFont, color: UIColor, spacing: CGFloat) -> UIImage

    Parameters

    font

    The font of the text.

    color

    The color of the text.

    spacing

    Character spacing.

    Return Value

    UIImage image with CVV.

  • Copies PAN to clipboard.

    Declaration

    Objective-C

    - (BOOL)copyPanToClipboard;

    Swift

    func copyPanToClipboard() -> Bool

    Return Value

    True if card data copied to clipboard. False otherwise.

  • Copies Expiry date in MM/YY format to clipboard.

    Declaration

    Objective-C

    - (BOOL)copyExpiryToClipboard;

    Swift

    func copyExpiryToClipboard() -> Bool

    Return Value

    True if card data copied to clipboard. False otherwise.

  • Copies emboss name to clipboard.

    Declaration

    Objective-C

    - (BOOL)copyEmbossNameToClipboard;

    Swift

    func copyEmbossNameToClipboard() -> Bool

    Return Value

    True if card data copied to clipboard. False otherwise.

  • Copies CVV to clipboard.

    Declaration

    Objective-C

    - (BOOL)copyCvvToClipboard;

    Swift

    func copyCvvToClipboard() -> Bool

    Return Value

    True if card data copied to clipboard. False otherwise.

  • Clears internal card data.

    Declaration

    Objective-C

    - (void)clearData;

    Swift

    func clearData()
  • Sets handler for card data wipe event.

    Declaration

    Objective-C

    @property (nullable) void (^)(void) cardDataClearedBlock;

    Swift

    var cardDataClearedBlock: (() -> Void)? { get set }
  • Constructs card data images from McdCardData object.

    Declaration

    Objective-C

    + (nonnull instancetype)cardDataImagesWithCardData:
        (McdCardData *_Nonnull)cardData;

    Swift

    convenience init(cardData: McdCardData)

    Parameters

    cardData

    McdCardData to create an instance of card data images.

    Return Value

    Card data images as instance of McdCardDataImages.

  • Verify if card data are valid.

    Declaration

    Objective-C

    - (BOOL)isValid;

    Swift

    func isValid() -> Bool

    Return Value

    Bool value if card data are valid.