prolificinteractive / Caishen

A Payment Card UI & Validator for iOS
MIT License
766 stars 119 forks source link

Fix memory leak and fix crash #152

Open classic-chris opened 5 years ago

classic-chris commented 5 years ago

Remove the overrides to becomeFirstResponder, resignFirstResponder, and isFirstResponder as they are causing UIKit to behave erroneously by creating a strong reference to the CardTextField that is not being released. Please see Issue #151 for details and reproducible steps.

My theory is that UIKit is having trouble that both the CardTextField and the child text field (NumberInputTextField for example) were both claiming to be the first responder at the same time.

Note that this could potentially be a breaking change if someone was relying on the logic in these overriden functions.