- July 30, 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.
PermissionsSwiftUI displays and handles permissions in SwiftUI. It is largely inspired by SPPermissions. The UI is highly customizable and resembles an Apple style. ...
Introduction PagerTabStripView is the first pager view built in pure SwiftUI. It provides a component to create interactive pager views ...
1. Taking Action When a Property Changes: Property Observers Swift lets you observe and respond to changes in a property’s ...