stripe / stripe-ios

Stripe iOS SDK
https://stripe.com
MIT License
2.12k stars 979 forks source link

Add a `shouldReturn` or `didReturn` hook #314

Closed irace closed 8 years ago

irace commented 8 years ago

When part of a larger form, it’s useful to be able to to move directly to the next field once the credit card field is done being populated.

jflinter commented 8 years ago

@irace - agreed, but there are a couple of problems with this.

I've considered adding a method to STPPaymentCardTextField like automaticallyShowInputAccessoryWithTarget:action: that'll wire up a UIToolbar with a done item as the textField's inputAccessoryView, and auto-enable the done item depending on its internal state. Thoughts?

irace commented 8 years ago

Not a bad idea, though also probably should be a pretty low priority.

jflinter commented 8 years ago

Oh, don't worry, it is.