Open K-d-y opened 1 year ago
Anyone who is looking for temporary solution , write didDisappear function in the viewcontroller where you are using this cardTextField
override func viewDidDisappear(_ animated: Bool) {
super.viewDidDisappear(animated)
view.endEditing(true)
view.subviews.forEach { view in
guard let cardTextfield = view as? CardTextField {
return
}
cardTextfield.removeFromSuperview()
}
}
Similar problem to the one solved earlier. Playable only on iOS 17. When closing and deinit the screen where CardTextField is located - strong references to CardTextField remain, which leads to application crash.
If user touches CardTextField, enters card number, month, year and CVV, then closes the screen - CardTextField is not released from memory, causing a crash. When entering only the card number, sometimes the crash does not occur.
The CardTextField remains in memory because a strong reference to it is stored in the UIKeyboardImpl.