BKMoneyKit

screenshot of BKMoneyKit

iOS UI controls and formatters for entering money, credit card number and expiry date.

Overview: BKMoneyKitiOS is a library that provides UI controls and formatters for entering money, credit card numbers, and expiry dates. It includes classes like BKCardNumberField, BKCardNumberLabel, BKCardNumberFormatter, BKCardExpiryField, and BKCurrencyTextField. It also supports displaying card logo images and provides customization options for formatting and masking card information.

Features:

  • BKCardNumberField: A subclass of UITextField that supports formatting card numbers and displaying card logo images.
  • BKCardNumberLabel: A subclass of UILabel that displays formatted card numbers and card brand logos. It also allows masking of card numbers.
  • BKCardNumberFormatter: A subclass of NSFormatter that formats card numbers based on predefined patterns. It allows customization of masking behavior, masking character, and group separator character.
  • BKCardExpiryField: A subclass of UITextField that supports formatting card expiry dates.
  • BKCurrencyTextField: A subclass of UITextField that supports formatting money amounts. It allows changing the currency by modifying the currencyCode property of the numberFormatter.

Installation: To install BKMoneyKitiOS, follow these steps:

  1. Download the library from the provided source.
  2. Add the library to your Xcode project.
  3. Import the necessary classes in your code files.
  4. Use the provided classes and functions to implement the desired functionality.

Example usage:

let cardNumberField = BKCardNumberField()
cardNumberField.showsCardLogo = true

let cardNumberLabel = BKCardNumberLabel()
cardNumberLabel.cardNumberFormatter.maskingCharacter = "X"

let cardExpiryField = BKCardExpiryField()

let currencyTextField = BKCurrencyTextField()
currencyTextField.numberFormatter.currencyCode = "USD"

Summary: BKMoneyKitiOS is a library that provides convenient UI controls and formatters for handling money, credit card numbers, and expiry dates in iOS applications. It offers features like card number formatting, card logo display, and currency formatting. The library simplifies the process of handling financial inputs and enhances the user experience in applications that require such functionality.