Closed welove closed 7 years ago
Hi @welove, thank you for reporting this issue! I tried to reproduce this bug on the Example project but it didn't crash for me with the lines that you posted above. Can you to share more information about how you set up Caishen and what you did when you ran into this issue please? Like:
A code snippet of your setup for the text field would be best!
Thanks, Daniel
Hi Danny, here is full my code:
cardTextField = CardTextField(frame: CGRect(x: 15, y: 5, width: cardBgView.frame.size.width-30, height: 30))
cardTextField.placeholder = NSLocalizedString("New Credit Card", comment: "")
cardTextField.cardTextFieldDelegate = self
cardTextField.numberInputTextField.cardNumberSeparator = "-"
cardBgView.addSubview(cardTextField)
Just tested it out, and If i comment/delete the placeholder line, it works.
I can't change the card number separator.
i tried:
cardTextField.numberInputTextField.cardNumberSeparator = "-"
and:cardTextField.cardNumberSeparator = "-"
i get the following error: Thread 1: EXC_BAD_ACCESS at CardNumberFormater.swift in public func format(cardNumber: String) -> String on the following line: regex = try NSRegularExpression(pattern: pattern, options: NSRegularExpression.Options())