McdEasyLaunchCardView
@IBDesignable
@objc(McdEasyLaunchCardView)
public class McdEasyLaunchCardView : UIView
Easy Launch Card View.
-
Sets Card Id.
Declaration
Swift
@objc @IBInspectable public var cardId: String
-
Custom card layout. The name of the XIB file without the .xib extension. If property is not set, default layout is used instead.
Declaration
Swift
@objc @IBInspectable public var layout: String? { get set }
-
Sets card background.
Declaration
Swift
@objc @IBInspectable public var cardBackground: UIImage? { get set }
-
Sets color of all texts printed on card. This property is ignored when custom card layout is set.
Declaration
Swift
@objc @IBInspectable public var textColor: UIColor { get set }
-
Sets font size of all texts printed on card. This property is ignored when custom card layout is set.
Declaration
Swift
@objc @IBInspectable public var fontSize: CGFloat { get set }
-
Sets font name of all texts printed on card. This property is ignored when custom card layout is set.
Declaration
Swift
@objc @IBInspectable public var fontName: String { get set }
-
Sets font of all texts printed on card. This property is ignored when custom card layout is set.
Declaration
Swift
@objc public var font: UIFont { get set }
-
Enables / Disables default card data loading indicator. Loading indicator is shown while retrieving card data over internet.
Declaration
Swift
@objc @IBInspectable public var loadingIndicatorEnabled: Bool
-
Sets color of data loading indicator.
Declaration
Swift
@objc @IBInspectable public var loadingIndicatorColor: UIColor { get set }
-
Shows or hides the default menu button. Default button is the only way of displaying the default menu.
Declaration
Swift
@objc @IBInspectable public var defaultMenuEnabled: Bool { get set }
-
Sets menu entry text for show card action.
Declaration
Swift
@objc @IBInspectable public var showMenuTitle: String
-
Sets menu entry text for hide card action.
Declaration
Swift
@objc @IBInspectable public var hideMenuTitle: String
-
Sets menu entry text for copy PAN action.
Declaration
Swift
@objc @IBInspectable public var panCopyMenuTitle: String
-
Sets menu entry text for copy holder name action.
Declaration
Swift
@objc @IBInspectable public var holderNameCopyMenuTitle: String
-
Sets menu entry text for copy valid thru action.
Declaration
Swift
@objc @IBInspectable public var validThruCopyMenuTitle: String
-
Sets menu entry text for cvv action.
Declaration
Swift
@objc @IBInspectable public var cvvCopyMenuTitle: String
-
Sets menu entry text for cancel action.
Declaration
Swift
@objc @IBInspectable public var cancelMenuTitle: String
-
Enables / Disables default widget toasts. Affects all widget messages informing about card data copy status - PAN copied, Valid thru copied, Holder name copied.
Declaration
Swift
@objc @IBInspectable public var toastsEnabled: Bool
-
Sets text to display in info toast when PAN is copied to clipboard.
Declaration
Swift
@objc @IBInspectable public var panCopyInfoText: String
-
Sets text to display in info toast when holder name is copied to clipboard.
Declaration
Swift
@objc @IBInspectable public var holderNameCopyInfoText: String
-
Sets text to display in info toast when valid thru information is copied to clipboard.
Declaration
Swift
@objc @IBInspectable public var validThruCopyInfoText: String
-
Sets text to display in info toast when PVV is copied to clipboard.
Declaration
Swift
@objc @IBInspectable public var cvvCopyInfoText: String
-
Sets secret generator handler.
Declaration
Swift
@objc public var secretGenerator: ((String) -> String)?
-
Sets async secret generator handler.
Parameters for secret generator:
String
- Card Id(String) -> void
- A block to execute when the secret is generated. This block has no return value and takes the secret as its only parameter.
Declaration
Swift
@objc public var secretGeneratorWithCompletion: ((String, @escaping (String) -> Void) -> Void)?
-
Sets handler for card onClick events.
Declaration
Swift
@available(*, deprecated, renamed: "cardTapBlock") @objc public var onCardClick: (() -> ())? { get set }
-
Sets handler for card onLongClick events.
Declaration
Swift
@available(*, deprecated, renamed: "cardLongPressBlock") @objc public var onCardLongClick: (() -> ())? { get set }
-
Sets handler for tap events.
Declaration
Swift
@objc public var cardTapBlock: (() -> ())?
-
Sets handler for long press events.
Declaration
Swift
@objc public var cardLongPressBlock: (() -> ())?
-
Sets handler for card data loading start.
Declaration
Swift
@objc public var cardDataLoadingStartedBlock: (() -> ())?
-
Sets handler for card data loading.
Declaration
Swift
@objc public var cardDataLoadingCompletedBlock: ((_ error: NSError?) -> ())?
-
Sets handler for card data wipe.
Declaration
Swift
@objc public var cardDataClearedBlock: (() -> ())?
-
Copies PAN if card data is acquired.
Declaration
Swift
@discardableResult @objc public func copyAcquiredPanToClipboard() -> Bool
Return Value
true
if card data acquired and is copied to clipboard,false
otherwise. -
Copies holder name if card data is acquired.
Declaration
Swift
@discardableResult @objc public func copyAcquiredHolderNameToClipboard() -> Bool
Return Value
true
if card data acquired and is copied to clipboard,false
otherwise. -
Copies valid thru information if card data is acquired.
Declaration
Swift
@discardableResult @objc public func copyAcquiredValidThruToClipboard() -> Bool
Return Value
true
if card data acquired and is copied to clipboard,false
otherwise. -
Copies CVV if card data is acquired.
Declaration
Swift
@discardableResult @objc public func copyAcquiredCvvClipboard() -> Bool
Return Value
true
if card data acquired and is copied to clipboard,false
otherwise. -
Reveals card data and copies PAN to clipboard. If card data is not acquired, performs acquisition at first.
Declaration
Swift
@objc public func revealAndCopyPanToClipboard(_ completionHandler: ((NSError?) -> Void)? = nil)
Parameters
completionHandler
The code block invoked when request is completed. Parameter for the
completionHandler
:NSError *_Nullable error
- Error object in case of failure
-
Reveals card data and copies holder name to clipboard. If card data is not acquired, performs acquisition at first.
Declaration
Swift
@objc public func revealAndCopyHolderNameToClipboard(_ completionHandler: ((NSError?) -> Void)? = nil)
Parameters
completionHandler
The code block invoked when request is completed. Parameter for the
completionHandler
:NSError *_Nullable error
- Error object in case of failure
-
Reveals card data and copies valid thru information in format of dd/yy to clipboard. If card data is not acquired, performs acquisition at first.
Declaration
Swift
@objc public func revealAndCopyValidThruToClipboard(_ completionHandler: ((NSError?) -> Void)? = nil)
Parameters
completionHandler
The code block invoked when request is completed. Parameter for the
completionHandler
:NSError *_Nullable error
- Error object in case of failure
-
Reveals card data and copies CVV to clipboard. If card data is not acquired, performs acquisition at first.
Declaration
Swift
@objc public func revealAndCopyCvvToClipboard(_ completionHandler: ((NSError?) -> Void)? = nil)
Parameters
completionHandler
The code block invoked when request is completed. Parameter for the
completionHandler
:NSError *_Nullable error
- Error object in case of failure
-
Requests and caches card data. Doesn’t reveal card. Method also checks if underlying MCD SDK is initialized and tries to initialize it if it is not.
Declaration
Swift
@objc public func acquireCardData(_ completionHandler: ((NSError?) -> Void)? = nil)
Parameters
completionHandler
The code block invoked when request is completed. Parameter for the
completionHandler
:NSError *_Nullable error
- Error object in case of failure
-
Reveals card data. Method acquires card data, if not already acquired.
Declaration
Swift
@objc public func showCardData(_ completionHandler: ((NSError?) -> Void)? = nil)
Parameters
completionHandler
The code block invoked when request is completed. Parameter for the
completionHandler
:NSError *_Nullable error
- Error object in case of failure
-
Hides card data on widget. Acquired data is not disposed.
Declaration
Swift
@objc public func hideCardData()
-
Disposes card data. Clears acquired card data and tries to clear clipboard.
Declaration
Swift
@objc public func disposeCardData()
-
True if card data is acquired. False otherwise.
Declaration
Swift
@objc public var isCardDataAcquired: Bool { get }
-
True if card data is revealed - printed on widget. False otherwise.
Declaration
Swift
@objc public var isCardDataRevealed: Bool { get }
-
Initializes and returns a newly allocated view object with the specified frame rectangle.
Declaration
Swift
public override init(frame: CGRect)
-
Declaration
Swift
public required init?(coder: NSCoder)
-
Declaration
Swift
public override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView?
-
Declaration
Swift
public override func layoutSubviews()