- August 28, 2025
- Mins Read
MFCard is an awesome looking Credit Card input & validation control. Written in Swift 3.
YOoo, Now MFCard is on Swift 5.
pod ‘MFCard’
Or you can choose version for Swift 4
pod ‘MFCard’, ‘1.2.6’
We are a mobile development agency working on Swift for iOS, Java for Android. We are available for new projects.
First Step – @import MFCard
to your project
Second Step – Add a delegate MFCardDelegate
to your class & add two delegate methods
Third Step – Present a Card
var myCard : MFCardView
myCard = MFCardView(withViewController: self)
myCard.delegate = self
myCard.autoDismiss = true
myCard.toast = true
myCard.showCard()
func cardDoneButtonClicked(_ card: Card?, error: String?) {
if error == nil{
print(card!)
}else{
print(error!)
}
}
var myCard : MFCardView
myCard = MFCardView(withViewController: self)
myCard.delegate = self
myCard.autoDismiss = true
myCard.toast = true
let demoCard :Card? = Card(holderName: “Rahul Chandnani”, number: “6552552665526625”, month: Month.Dec, year: “2019”, cvc: “234”, paymentType: Card.PaymentType.bank, cardType: CardType.Discover, userId: 0)
myCard.showCardWithCardDetails(card: demoCard!)
Add this to your Podfile.
pod ‘MFCard’
Feel free to collaborate with ideas, issues and/or pull requests.
This package provides you with an easy way to show tooltips over any SwiftUI view, since Apple does not provide ...
SimpleToast is a simple, lightweight, flexible and easy to use library to show toasts / popup notifications inside iOS or ...
Create Toast Views with Minimal Effort in SwiftUI Using SSToastMessage. SSToastMessage enables you to effortlessly add toast notifications, alerts, and ...