Bank Card Generator with Swift using SnapKit DSL 💳

Overview

iCard

BankCard & CreditCard generator with Swift 3 using SnapKit DSL

iCard is a simple tool for generate Credit & Bank Card , it represent cards as UIView and it's a subclass of UIView

Screenshots

.chip1 - .blueway - .withBothBankIcon - .cirrusIcon & .chip3 - .blueway - .withBothBankIcon - .masterCardIcon

alt-text-1 alt-text-2

.chip2 - .yelloway - .googleWalletIcon - .cirrusIcon & .chip2 - .yelloway - .withDefaultTitles

alt-text-1 alt-text-2

.chip1 - .cirrusIcon - .withBothBankIcon & .chip2 - .withBothBankIcon

alt-text-1 alt-text-2

Init

init(cardStyleWithBackgroundColor: cardStyle , withCardColors colors: cardColors , pinIcon: chipIcons , creditIcons: creditIcons)

For creating iCard with single backgroundColor , you should use this initalizer and you must choose cardStyle, cardColors, pinIcons and creditIcons

let simpleCard: iCreditCard = iCreditCard(cardStyleWithBackgroundColor: .withBothBankIcon, withCardColors: .blueway, pinIcon: .chip1, creditIcons: .cirrusIcon)

And if you create an iCreditCard with has a unique background image , you can easily use this init function. You must send UIImage to init otherwise if withCardImage is nil , it will have simple backgroundColor.

init(cardStyleWithBackgroundImage: cardStyle , withCardImage: UIImage?, pinIcon: chipIcons , creditIcons: creditIcons)

Here is a simple creation of iCard with backgroundImage

let simpleCard: iCreditCard = iCreditCard(cardStyleWithBackgroundImage: .withBothBankIcon, withCardImage: UIImage(named:"simpleBackgroundImage"), pinIcon: .chip2, creditIcons: .maestroIcon)

Convenience Init

You can also create iCard with no-parameter or single-parameter

convenience init(){
self.init(cardStyleWithBackgroundColor: .withBothBankIcon, withCardColors: .yelloway, pinIcon: .chip1, creditIcons: .cirrusIcon) }

Here is a simple example of it . If you use this initializer you will created a iCard with .withBothBankIcon style , .yelloway color , .chip1 chip and .cirrusIcon icon

Here is a simple usage

let simpleCard: iCreditCard = iCreditCard()

Another convenience init is below.

convenience init(cardColors: cardColors){
self.init(cardStyleWithBackgroundColor: .withBothBankIcon, withCardColors: .yelloway, pinIcon: .chip2, creditIcons: .americanExpressIcon)
}

Here is a simple usage of it

let simpleCard2: iCreditCard = iCreditCard(cardColors: .blueway)

Structs

public enum cardColors{
case blueway
case yelloway
}

cardColors using when choose card backgroundColor , now support only 2 color as blue and yellow

public enum cardVisual{
case withBackgroundColor
case withBackgroundImage
}

cardVisual is used to choose card type.

public enum cardStyle{
case withDefaultTitles
case withTopBankIcon
case withBottomBankIcon
case withBothBankIcon
}

cardStyle is used to set card style to different type.

public enum chipIcons{
case chip1
case chip2
case chip3
}

chipIcons is used to choose card chip icons, there are only 3 different chip icons

public enum creditIcons{
case americanExpressIcon
case bitcoinIcon
case bluePayIcon
case cirrusIcon
case citiIcon
case clickBank
case cvsIcon
case googleWalletIcon
case hsbcIcon
case maestroIcon
case maestroIcon2
case masterCard
case masterCardMini
case masterCardDetail
case moneyGramIcon
case paypalIcon
case paypalIconSimple
case visaIcon
case visaIconBigger
case visaIconText
case wePayIcon
case westernUnionIcon
}
Parameter Icons
.americanExpressIcon
.bitcoinIcon
.bluePayIcon
.cirrusIcon
.citiIcon
.clickBank
.cvsIcon
.googleWalletIcon
.hsbcIcon
.maestroIcon
.maestroIcon2
.masterCard
.masterCardMini
.masterCardDetail
.moneyGramIcon
.paypalIcon
.paypalIconSimple
.visaIcon
.visaIconBigger
.visaIconText
.wePayIcon
.westernUnionIcon
public enum chipIcons{
case chip1
case chip2
case chip3
}
Parameter Icons
.chip1
.chip2
.chip3

Font and Icons

I have used HALTER__.ttf font for cardNumber and also 've used Icon-Icons Website for all icons.

Installation

git clone REPO_URL
cd iCard/
use iCreditCard.swift 

Development

Want to contribute? Feel free to contribute anything on this with describing contributed part

Todos

  • Write Tests
  • Add BackView Generator with init

License

MIT

Open Source

You might also like...
A Payment Card UI & Validator for iOS
A Payment Card UI & Validator for iOS

Description Caishen provides an easy-to-use text field to ask users for payment card information and to validate the input. It serves a similar purpos

Luhn Credit Card Validation Algorithm

Luhn Algorithm This is a port of the Luhn Algorithm, generally used for validating Credit Card details, to Objective-C (iOS). Swift port can be found

CreditCardForm is iOS framework that allows developers to create the UI which replicates an actual Credit Card.
CreditCardForm is iOS framework that allows developers to create the UI which replicates an actual Credit Card.

CreditCardForm CreditCardForm is iOS framework that allows developers to create the UI which replicates an actual Credit Card. Fixed typo use CreditCa

A study card application built with SwiftUI and Combine
A study card application built with SwiftUI and Combine

StudyCards Description A study card application. I built this application to get

TextFieldFormatter - Simple Text Formatter (Credit Card Number, Phone Number, Serial Number etc.)
TextFieldFormatter - Simple Text Formatter (Credit Card Number, Phone Number, Serial Number etc.)

TextFieldFormatter Simple Text Formatter (Credit Card Number, Phone Number, Seri

Code1System Card Moudle

Code1CardLib Example To run the example project, clone the repo, and run pod install from the Example directory first. Requirements Installation Code1

SwiftUI BusinessCard - Created iOS Business card app to practice SwiftUI
SwiftUI BusinessCard - Created iOS Business card app to practice SwiftUI

SwiftUI_BusinessCard Created iOS Business card app to practice SwiftUI

Luhn Credit Card Validation Algorithm

Luhn Algorithm This is a port of the Luhn Algorithm, generally used for validating Credit Card details, to Objective-C (iOS). Swift port can be found

TPInAppReceipt is a lightweight, pure-Swift library for reading and validating Apple In App Purchase Receipt locally.
TPInAppReceipt is a lightweight, pure-Swift library for reading and validating Apple In App Purchase Receipt locally.

TPInAppReceipt is a lightweight, pure-Swift library for reading and validating Apple In App Purchase Receipt locally. Features Read all

Owner
Emrah Korkmaz
Software Engineer
Emrah Korkmaz
Ios-card-transition - iOS CocoaPod to create beautiful card transitions

CSCardTransition CSCardTransition is a small library allowing you to create wond

Creastel 12 Oct 31, 2022
Card Decks is a small utility application for your iPhone, iPod touch and iPad which brings you simple, configurable, colored, multi-line text cards that are grouped into card decks

Card Decks is a small utility application for your iPhone, iPod touch and iPad which brings you simple, configurable, colored, multi-line text cards that are grouped into card decks.

Arne Harren 40 Nov 24, 2022
A credit card reader and parser for iOS Using Native Vision/VisionKit

card-reader-ios A credit card reader and parser for iOS Using Native Vision/VisionKit May-14-2021.00-43-17.mp4 Instructions Hold camera up to a card a

Khalid Asad 104 Dec 15, 2022
Easily integrate Credit Card payments module in iOS App. Swift 4.0

MFCard Buy me a coffee MFCard is an awesome looking Credit Card input & validation control. Written in Swift 3. YOoo, Now MFCard is on Swift 5. Swift

MobileFirst 362 Nov 29, 2022
Debit/Credit card validation port of the Luhn Algorithm in Swift

SwiftLuhn Warning! This repository is no longer maintained. This is a port of the Luhn Algorithm, generally used for validating debit/credit card deta

Max Kramer 135 Sep 9, 2022
Welcome Busines Card Built With Swift

BusinessCard Welcome Busines Card Main screen Contacts screen More info screen

Konstantin Ryabtsev 0 Dec 28, 2021
A card viewer demo for Idolmaster Millionlive Theater Days written in Swift UI

Misaki Gallery A Millionlive's cards gallery to demostrate Swift UI. All api and

Spike 0 Dec 20, 2021
A credit card scanner for iOS written in Swift

DGCardScanner A credit card scanner Requirements iOS 13.0+ Swift 5.5+ Xcode 10.0+ Installation SPM File > Add Packages > https://github.com/donggyushi

donggyu 9 Jun 24, 2022
Wizards-pal - Life counter for card games,built with swift

Life counter for card games Made this app in the weekend to help ma boys with ht

Vladimir Ignatov 2 Oct 28, 2022
Easy to use iOS library with components for input of Credit Card data.

AnimatedCardInput This library allows you to drop into your project two easily customisable, animated components that will make input of Credit Card i

Netguru 39 Oct 16, 2022